/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    cn-qingdao = 'live.aliyuncs.com',
    cn-beijing = 'live.aliyuncs.com',
    cn-hangzhou = 'live.aliyuncs.com',
    cn-shanghai = 'live.aliyuncs.com',
    cn-shenzhen = 'live.aliyuncs.com',
    ap-southeast-1 = 'live.aliyuncs.com',
    ap-southeast-5 = 'live.aliyuncs.com',
    ap-northeast-1 = 'live.aliyuncs.com',
    eu-central-1 = 'live.aliyuncs.com',
    ap-south-1 = 'live.aliyuncs.com',
    ap-northeast-2-pop = 'live.aliyuncs.com',
    ap-southeast-2 = 'live.aliyuncs.com',
    ap-southeast-3 = 'live.aliyuncs.com',
    cn-beijing-finance-1 = 'live.aliyuncs.com',
    cn-beijing-finance-pop = 'live.aliyuncs.com',
    cn-beijing-gov-1 = 'live.aliyuncs.com',
    cn-beijing-nu16-b01 = 'live.aliyuncs.com',
    cn-chengdu = 'live.aliyuncs.com',
    cn-edge-1 = 'live.aliyuncs.com',
    cn-fujian = 'live.aliyuncs.com',
    cn-haidian-cm12-c01 = 'live.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'live.aliyuncs.com',
    cn-hangzhou-finance = 'live.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'live.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'live.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'live.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'live.aliyuncs.com',
    cn-hangzhou-test-306 = 'live.aliyuncs.com',
    cn-hongkong = 'live.aliyuncs.com',
    cn-hongkong-finance-pop = 'live.aliyuncs.com',
    cn-huhehaote = 'live.aliyuncs.com',
    cn-huhehaote-nebula-1 = 'live.aliyuncs.com',
    cn-north-2-gov-1 = 'live.aliyuncs.com',
    cn-qingdao-nebula = 'live.aliyuncs.com',
    cn-shanghai-et15-b01 = 'live.aliyuncs.com',
    cn-shanghai-et2-b01 = 'live.aliyuncs.com',
    cn-shanghai-finance-1 = 'live.aliyuncs.com',
    cn-shanghai-inner = 'live.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'live.aliyuncs.com',
    cn-shenzhen-finance-1 = 'live.aliyuncs.com',
    cn-shenzhen-inner = 'live.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'live.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'live.aliyuncs.com',
    cn-wuhan = 'live.aliyuncs.com',
    cn-wulanchabu = 'live.aliyuncs.com',
    cn-yushanfang = 'live.aliyuncs.com',
    cn-zhangbei = 'live.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'live.aliyuncs.com',
    cn-zhangjiakou = 'live.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'live.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'live.aliyuncs.com',
    eu-west-1 = 'live.aliyuncs.com',
    eu-west-1-oxs = 'live.aliyuncs.com',
    me-east-1 = 'live.aliyuncs.com',
    rus-west-1-pop = 'live.aliyuncs.com',
    us-east-1 = 'live.aliyuncs.com',
    us-west-1 = 'live.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('live', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddCasterComponentRequest {
  captionLayerContent?: string(name='CaptionLayerContent'),
  casterId?: string(name='CasterId'),
  componentLayer?: string(name='ComponentLayer'),
  componentName?: string(name='ComponentName'),
  componentType?: string(name='ComponentType'),
  effect?: string(name='Effect'),
  htmlLayerContent?: string(name='HtmlLayerContent'),
  imageLayerContent?: string(name='ImageLayerContent'),
  layerOrder?: string(name='LayerOrder'),
  locationId?: string(name='LocationId'),
  ownerId?: long(name='OwnerId'),
  textLayerContent?: string(name='TextLayerContent'),
}

model AddCasterComponentResponseBody = {
  componentId?: string(name='ComponentId'),
  requestId?: string(name='RequestId'),
}

model AddCasterComponentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterComponentResponseBody(name='body'),
}

async function addCasterComponentWithOptions(request: AddCasterComponentRequest, runtime: Util.RuntimeOptions): AddCasterComponentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.captionLayerContent)) {
    query['CaptionLayerContent'] = request.captionLayerContent;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentLayer)) {
    query['ComponentLayer'] = request.componentLayer;
  }
  if (!Util.isUnset(request.componentName)) {
    query['ComponentName'] = request.componentName;
  }
  if (!Util.isUnset(request.componentType)) {
    query['ComponentType'] = request.componentType;
  }
  if (!Util.isUnset(request.effect)) {
    query['Effect'] = request.effect;
  }
  if (!Util.isUnset(request.htmlLayerContent)) {
    query['HtmlLayerContent'] = request.htmlLayerContent;
  }
  if (!Util.isUnset(request.imageLayerContent)) {
    query['ImageLayerContent'] = request.imageLayerContent;
  }
  if (!Util.isUnset(request.layerOrder)) {
    query['LayerOrder'] = request.layerOrder;
  }
  if (!Util.isUnset(request.locationId)) {
    query['LocationId'] = request.locationId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.textLayerContent)) {
    query['TextLayerContent'] = request.textLayerContent;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterComponent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterComponent(request: AddCasterComponentRequest): AddCasterComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterComponentWithOptions(request, runtime);
}

model AddCasterEpisodeRequest {
  casterId?: string(name='CasterId'),
  componentId?: [ string ](name='ComponentId'),
  endTime?: string(name='EndTime'),
  episodeName?: string(name='EpisodeName'),
  episodeType?: string(name='EpisodeType'),
  ownerId?: long(name='OwnerId'),
  resourceId?: string(name='ResourceId'),
  startTime?: string(name='StartTime'),
  switchType?: string(name='SwitchType'),
}

model AddCasterEpisodeResponseBody = {
  episodeId?: string(name='EpisodeId'),
  requestId?: string(name='RequestId'),
}

model AddCasterEpisodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterEpisodeResponseBody(name='body'),
}

async function addCasterEpisodeWithOptions(request: AddCasterEpisodeRequest, runtime: Util.RuntimeOptions): AddCasterEpisodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.episodeName)) {
    query['EpisodeName'] = request.episodeName;
  }
  if (!Util.isUnset(request.episodeType)) {
    query['EpisodeType'] = request.episodeType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.switchType)) {
    query['SwitchType'] = request.switchType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterEpisode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterEpisode(request: AddCasterEpisodeRequest): AddCasterEpisodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterEpisodeWithOptions(request, runtime);
}

model AddCasterEpisodeGroupRequest {
  callbackUrl?: string(name='CallbackUrl'),
  clientToken?: string(name='ClientToken'),
  domainName?: string(name='DomainName'),
  item?: [ 
    {
      itemName?: string(name='ItemName'),
      vodUrl?: string(name='VodUrl'),
    }
  ](name='Item'),
  ownerId?: long(name='OwnerId'),
  repeatNum?: int32(name='RepeatNum'),
  sideOutputUrl?: string(name='SideOutputUrl'),
  startTime?: string(name='StartTime'),
}

model AddCasterEpisodeGroupResponseBody = {
  itemIds?: {
    itemId?: [ string ](name='ItemId')
  }(name='ItemIds'),
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model AddCasterEpisodeGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterEpisodeGroupResponseBody(name='body'),
}

async function addCasterEpisodeGroupWithOptions(request: AddCasterEpisodeGroupRequest, runtime: Util.RuntimeOptions): AddCasterEpisodeGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callbackUrl)) {
    query['CallbackUrl'] = request.callbackUrl;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.item)) {
    query['Item'] = request.item;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.repeatNum)) {
    query['RepeatNum'] = request.repeatNum;
  }
  if (!Util.isUnset(request.sideOutputUrl)) {
    query['SideOutputUrl'] = request.sideOutputUrl;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterEpisodeGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterEpisodeGroup(request: AddCasterEpisodeGroupRequest): AddCasterEpisodeGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterEpisodeGroupWithOptions(request, runtime);
}

model AddCasterEpisodeGroupContentRequest {
  clientToken?: string(name='ClientToken'),
  content?: string(name='Content'),
  ownerId?: long(name='OwnerId'),
}

model AddCasterEpisodeGroupContentResponseBody = {
  itemIds?: {
    itemId?: [ string ](name='ItemId')
  }(name='ItemIds'),
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model AddCasterEpisodeGroupContentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterEpisodeGroupContentResponseBody(name='body'),
}

async function addCasterEpisodeGroupContentWithOptions(request: AddCasterEpisodeGroupContentRequest, runtime: Util.RuntimeOptions): AddCasterEpisodeGroupContentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.content)) {
    query['Content'] = request.content;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterEpisodeGroupContent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterEpisodeGroupContent(request: AddCasterEpisodeGroupContentRequest): AddCasterEpisodeGroupContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterEpisodeGroupContentWithOptions(request, runtime);
}

model AddCasterLayoutRequest {
  audioLayer?: [ 
    {
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      validChannel?: string(name='ValidChannel'),
      volumeRate?: float(name='VolumeRate'),
    }
  ](name='AudioLayer'),
  blendList?: [ string ](name='BlendList'),
  casterId?: string(name='CasterId'),
  mixList?: [ string ](name='MixList'),
  ownerId?: long(name='OwnerId'),
  videoLayer?: [ 
    {
      fillMode?: string(name='FillMode'),
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      heightNormalized?: float(name='HeightNormalized'),
      positionNormalized?: [ float ](name='PositionNormalized'),
      positionRefer?: string(name='PositionRefer'),
      widthNormalized?: float(name='WidthNormalized'),
    }
  ](name='VideoLayer'),
}

model AddCasterLayoutResponseBody = {
  layoutId?: string(name='LayoutId'),
  requestId?: string(name='RequestId'),
}

model AddCasterLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterLayoutResponseBody(name='body'),
}

async function addCasterLayoutWithOptions(request: AddCasterLayoutRequest, runtime: Util.RuntimeOptions): AddCasterLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.audioLayer)) {
    query['AudioLayer'] = request.audioLayer;
  }
  if (!Util.isUnset(request.blendList)) {
    query['BlendList'] = request.blendList;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.mixList)) {
    query['MixList'] = request.mixList;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.videoLayer)) {
    query['VideoLayer'] = request.videoLayer;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterLayout(request: AddCasterLayoutRequest): AddCasterLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterLayoutWithOptions(request, runtime);
}

model AddCasterProgramRequest {
  casterId?: string(name='CasterId'),
  episode?: [ 
    {
      componentId?: [ string ](name='ComponentId'),
      endTime?: string(name='EndTime'),
      episodeName?: string(name='EpisodeName'),
      episodeType?: string(name='EpisodeType'),
      resourceId?: string(name='ResourceId'),
      startTime?: string(name='StartTime'),
      switchType?: string(name='SwitchType'),
    }
  ](name='Episode'),
  ownerId?: long(name='OwnerId'),
}

model AddCasterProgramResponseBody = {
  episodeIds?: {
    episodeId?: [ 
    {
      episodeId?: string(name='EpisodeId'),
    }
  ](name='EpisodeId')
  }(name='EpisodeIds'),
  requestId?: string(name='RequestId'),
}

model AddCasterProgramResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterProgramResponseBody(name='body'),
}

async function addCasterProgramWithOptions(request: AddCasterProgramRequest, runtime: Util.RuntimeOptions): AddCasterProgramResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.episode)) {
    query['Episode'] = request.episode;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterProgram',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterProgram(request: AddCasterProgramRequest): AddCasterProgramResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterProgramWithOptions(request, runtime);
}

model AddCasterVideoResourceRequest {
  beginOffset?: int32(name='BeginOffset'),
  casterId?: string(name='CasterId'),
  endOffset?: int32(name='EndOffset'),
  fixedDelayDuration?: int32(name='FixedDelayDuration'),
  liveStreamUrl?: string(name='LiveStreamUrl'),
  locationId?: string(name='LocationId'),
  materialId?: string(name='MaterialId'),
  ownerId?: long(name='OwnerId'),
  ptsCallbackInterval?: int32(name='PtsCallbackInterval'),
  repeatNum?: int32(name='RepeatNum'),
  resourceName?: string(name='ResourceName'),
  streamId?: string(name='StreamId'),
  vodUrl?: string(name='VodUrl'),
}

model AddCasterVideoResourceResponseBody = {
  requestId?: string(name='RequestId'),
  resourceId?: string(name='ResourceId'),
}

model AddCasterVideoResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCasterVideoResourceResponseBody(name='body'),
}

async function addCasterVideoResourceWithOptions(request: AddCasterVideoResourceRequest, runtime: Util.RuntimeOptions): AddCasterVideoResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.beginOffset)) {
    query['BeginOffset'] = request.beginOffset;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.endOffset)) {
    query['EndOffset'] = request.endOffset;
  }
  if (!Util.isUnset(request.fixedDelayDuration)) {
    query['FixedDelayDuration'] = request.fixedDelayDuration;
  }
  if (!Util.isUnset(request.liveStreamUrl)) {
    query['LiveStreamUrl'] = request.liveStreamUrl;
  }
  if (!Util.isUnset(request.locationId)) {
    query['LocationId'] = request.locationId;
  }
  if (!Util.isUnset(request.materialId)) {
    query['MaterialId'] = request.materialId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ptsCallbackInterval)) {
    query['PtsCallbackInterval'] = request.ptsCallbackInterval;
  }
  if (!Util.isUnset(request.repeatNum)) {
    query['RepeatNum'] = request.repeatNum;
  }
  if (!Util.isUnset(request.resourceName)) {
    query['ResourceName'] = request.resourceName;
  }
  if (!Util.isUnset(request.streamId)) {
    query['StreamId'] = request.streamId;
  }
  if (!Util.isUnset(request.vodUrl)) {
    query['VodUrl'] = request.vodUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCasterVideoResource',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCasterVideoResource(request: AddCasterVideoResourceRequest): AddCasterVideoResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCasterVideoResourceWithOptions(request, runtime);
}

model AddCustomLiveStreamTranscodeRequest {
  app?: string(name='App'),
  audioBitrate?: int32(name='AudioBitrate'),
  audioChannelNum?: int32(name='AudioChannelNum'),
  audioCodec?: string(name='AudioCodec'),
  audioProfile?: string(name='AudioProfile'),
  audioRate?: int32(name='AudioRate'),
  domain?: string(name='Domain'),
  encryptParameters?: string(name='EncryptParameters'),
  FPS?: int32(name='FPS'),
  gop?: string(name='Gop'),
  height?: int32(name='Height'),
  kmsKeyExpireInterval?: string(name='KmsKeyExpireInterval'),
  kmsKeyID?: string(name='KmsKeyID'),
  kmsUID?: string(name='KmsUID'),
  ownerId?: long(name='OwnerId'),
  profile?: int32(name='Profile'),
  template?: string(name='Template'),
  templateType?: string(name='TemplateType'),
  videoBitrate?: int32(name='VideoBitrate'),
  width?: int32(name='Width'),
}

model AddCustomLiveStreamTranscodeResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddCustomLiveStreamTranscodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCustomLiveStreamTranscodeResponseBody(name='body'),
}

async function addCustomLiveStreamTranscodeWithOptions(request: AddCustomLiveStreamTranscodeRequest, runtime: Util.RuntimeOptions): AddCustomLiveStreamTranscodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.audioBitrate)) {
    query['AudioBitrate'] = request.audioBitrate;
  }
  if (!Util.isUnset(request.audioChannelNum)) {
    query['AudioChannelNum'] = request.audioChannelNum;
  }
  if (!Util.isUnset(request.audioCodec)) {
    query['AudioCodec'] = request.audioCodec;
  }
  if (!Util.isUnset(request.audioProfile)) {
    query['AudioProfile'] = request.audioProfile;
  }
  if (!Util.isUnset(request.audioRate)) {
    query['AudioRate'] = request.audioRate;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.encryptParameters)) {
    query['EncryptParameters'] = request.encryptParameters;
  }
  if (!Util.isUnset(request.FPS)) {
    query['FPS'] = request.FPS;
  }
  if (!Util.isUnset(request.gop)) {
    query['Gop'] = request.gop;
  }
  if (!Util.isUnset(request.height)) {
    query['Height'] = request.height;
  }
  if (!Util.isUnset(request.kmsKeyExpireInterval)) {
    query['KmsKeyExpireInterval'] = request.kmsKeyExpireInterval;
  }
  if (!Util.isUnset(request.kmsKeyID)) {
    query['KmsKeyID'] = request.kmsKeyID;
  }
  if (!Util.isUnset(request.kmsUID)) {
    query['KmsUID'] = request.kmsUID;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.profile)) {
    query['Profile'] = request.profile;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  if (!Util.isUnset(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  if (!Util.isUnset(request.videoBitrate)) {
    query['VideoBitrate'] = request.videoBitrate;
  }
  if (!Util.isUnset(request.width)) {
    query['Width'] = request.width;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddCustomLiveStreamTranscode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCustomLiveStreamTranscode(request: AddCustomLiveStreamTranscodeRequest): AddCustomLiveStreamTranscodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCustomLiveStreamTranscodeWithOptions(request, runtime);
}

model AddLiveAppRecordConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  onDemand?: int32(name='OnDemand'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ownerId?: long(name='OwnerId'),
  recordFormat?: [ 
    {
      cycleDuration?: int32(name='CycleDuration'),
      format?: string(name='Format'),
      ossObjectPrefix?: string(name='OssObjectPrefix'),
      sliceDuration?: int32(name='SliceDuration'),
      sliceOssObjectPrefix?: string(name='SliceOssObjectPrefix'),
    }
  ](name='RecordFormat'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
  transcodeRecordFormat?: [ 
    {
      cycleDuration?: int32(name='CycleDuration'),
      format?: string(name='Format'),
      ossObjectPrefix?: string(name='OssObjectPrefix'),
      sliceDuration?: int32(name='SliceDuration'),
      sliceOssObjectPrefix?: string(name='SliceOssObjectPrefix'),
    }
  ](name='TranscodeRecordFormat'),
  transcodeTemplates?: [ string ](name='TranscodeTemplates'),
}

model AddLiveAppRecordConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveAppRecordConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveAppRecordConfigResponseBody(name='body'),
}

async function addLiveAppRecordConfigWithOptions(request: AddLiveAppRecordConfigRequest, runtime: Util.RuntimeOptions): AddLiveAppRecordConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.onDemand)) {
    query['OnDemand'] = request.onDemand;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recordFormat)) {
    query['RecordFormat'] = request.recordFormat;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.transcodeRecordFormat)) {
    query['TranscodeRecordFormat'] = request.transcodeRecordFormat;
  }
  if (!Util.isUnset(request.transcodeTemplates)) {
    query['TranscodeTemplates'] = request.transcodeTemplates;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveAppRecordConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveAppRecordConfig(request: AddLiveAppRecordConfigRequest): AddLiveAppRecordConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveAppRecordConfigWithOptions(request, runtime);
}

model AddLiveAppSnapshotConfigRequest {
  appName?: string(name='AppName'),
  callback?: string(name='Callback'),
  domainName?: string(name='DomainName'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  overwriteOssObject?: string(name='OverwriteOssObject'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  sequenceOssObject?: string(name='SequenceOssObject'),
  timeInterval?: int32(name='TimeInterval'),
}

model AddLiveAppSnapshotConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveAppSnapshotConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveAppSnapshotConfigResponseBody(name='body'),
}

async function addLiveAppSnapshotConfigWithOptions(request: AddLiveAppSnapshotConfigRequest, runtime: Util.RuntimeOptions): AddLiveAppSnapshotConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.overwriteOssObject)) {
    query['OverwriteOssObject'] = request.overwriteOssObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.sequenceOssObject)) {
    query['SequenceOssObject'] = request.sequenceOssObject;
  }
  if (!Util.isUnset(request.timeInterval)) {
    query['TimeInterval'] = request.timeInterval;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveAppSnapshotConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveAppSnapshotConfig(request: AddLiveAppSnapshotConfigRequest): AddLiveAppSnapshotConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveAppSnapshotConfigWithOptions(request, runtime);
}

model AddLiveAudioAuditConfigRequest {
  appName?: string(name='AppName'),
  bizType?: string(name='BizType'),
  domainName?: string(name='DomainName'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossObject?: string(name='OssObject'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model AddLiveAudioAuditConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveAudioAuditConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveAudioAuditConfigResponseBody(name='body'),
}

async function addLiveAudioAuditConfigWithOptions(request: AddLiveAudioAuditConfigRequest, runtime: Util.RuntimeOptions): AddLiveAudioAuditConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossObject)) {
    query['OssObject'] = request.ossObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveAudioAuditConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveAudioAuditConfig(request: AddLiveAudioAuditConfigRequest): AddLiveAudioAuditConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveAudioAuditConfigWithOptions(request, runtime);
}

model AddLiveAudioAuditNotifyConfigRequest {
  callback?: string(name='Callback'),
  callbackTemplate?: string(name='CallbackTemplate'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model AddLiveAudioAuditNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveAudioAuditNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveAudioAuditNotifyConfigResponseBody(name='body'),
}

async function addLiveAudioAuditNotifyConfigWithOptions(request: AddLiveAudioAuditNotifyConfigRequest, runtime: Util.RuntimeOptions): AddLiveAudioAuditNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!Util.isUnset(request.callbackTemplate)) {
    query['CallbackTemplate'] = request.callbackTemplate;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveAudioAuditNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveAudioAuditNotifyConfig(request: AddLiveAudioAuditNotifyConfigRequest): AddLiveAudioAuditNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveAudioAuditNotifyConfigWithOptions(request, runtime);
}

model AddLiveDetectNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  notifyUrl?: string(name='NotifyUrl'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model AddLiveDetectNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveDetectNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveDetectNotifyConfigResponseBody(name='body'),
}

async function addLiveDetectNotifyConfigWithOptions(request: AddLiveDetectNotifyConfigRequest, runtime: Util.RuntimeOptions): AddLiveDetectNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveDetectNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveDetectNotifyConfig(request: AddLiveDetectNotifyConfigRequest): AddLiveDetectNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveDetectNotifyConfigWithOptions(request, runtime);
}

model AddLiveDomainRequest {
  checkUrl?: string(name='CheckUrl'),
  domainName?: string(name='DomainName'),
  liveDomainType?: string(name='LiveDomainType'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region'),
  scope?: string(name='Scope'),
  securityToken?: string(name='SecurityToken'),
  topLevelDomain?: string(name='TopLevelDomain'),
}

model AddLiveDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveDomainResponseBody(name='body'),
}

async function addLiveDomainWithOptions(request: AddLiveDomainRequest, runtime: Util.RuntimeOptions): AddLiveDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.checkUrl)) {
    query['CheckUrl'] = request.checkUrl;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.liveDomainType)) {
    query['LiveDomainType'] = request.liveDomainType;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.scope)) {
    query['Scope'] = request.scope;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.topLevelDomain)) {
    query['TopLevelDomain'] = request.topLevelDomain;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveDomain',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveDomain(request: AddLiveDomainRequest): AddLiveDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveDomainWithOptions(request, runtime);
}

model AddLiveDomainMappingRequest {
  ownerId?: long(name='OwnerId'),
  pullDomain?: string(name='PullDomain'),
  pushDomain?: string(name='PushDomain'),
  securityToken?: string(name='SecurityToken'),
}

model AddLiveDomainMappingResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveDomainMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveDomainMappingResponseBody(name='body'),
}

async function addLiveDomainMappingWithOptions(request: AddLiveDomainMappingRequest, runtime: Util.RuntimeOptions): AddLiveDomainMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pullDomain)) {
    query['PullDomain'] = request.pullDomain;
  }
  if (!Util.isUnset(request.pushDomain)) {
    query['PushDomain'] = request.pushDomain;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveDomainMapping',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveDomainMapping(request: AddLiveDomainMappingRequest): AddLiveDomainMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveDomainMappingWithOptions(request, runtime);
}

model AddLiveDomainPlayMappingRequest {
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain'),
  pullDomain?: string(name='PullDomain'),
}

model AddLiveDomainPlayMappingResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveDomainPlayMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveDomainPlayMappingResponseBody(name='body'),
}

async function addLiveDomainPlayMappingWithOptions(request: AddLiveDomainPlayMappingRequest, runtime: Util.RuntimeOptions): AddLiveDomainPlayMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!Util.isUnset(request.pullDomain)) {
    query['PullDomain'] = request.pullDomain;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveDomainPlayMapping',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveDomainPlayMapping(request: AddLiveDomainPlayMappingRequest): AddLiveDomainPlayMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveDomainPlayMappingWithOptions(request, runtime);
}

model AddLivePullStreamInfoConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  sourceUrl?: string(name='SourceUrl'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model AddLivePullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLivePullStreamInfoConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLivePullStreamInfoConfigResponseBody(name='body'),
}

async function addLivePullStreamInfoConfigWithOptions(request: AddLivePullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): AddLivePullStreamInfoConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sourceUrl)) {
    query['SourceUrl'] = request.sourceUrl;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLivePullStreamInfoConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLivePullStreamInfoConfig(request: AddLivePullStreamInfoConfigRequest): AddLivePullStreamInfoConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLivePullStreamInfoConfigWithOptions(request, runtime);
}

model AddLiveRecordNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  needStatusNotify?: boolean(name='NeedStatusNotify'),
  notifyUrl?: string(name='NotifyUrl'),
  onDemandUrl?: string(name='OnDemandUrl'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model AddLiveRecordNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveRecordNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveRecordNotifyConfigResponseBody(name='body'),
}

async function addLiveRecordNotifyConfigWithOptions(request: AddLiveRecordNotifyConfigRequest, runtime: Util.RuntimeOptions): AddLiveRecordNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.needStatusNotify)) {
    query['NeedStatusNotify'] = request.needStatusNotify;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.onDemandUrl)) {
    query['OnDemandUrl'] = request.onDemandUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveRecordNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveRecordNotifyConfig(request: AddLiveRecordNotifyConfigRequest): AddLiveRecordNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveRecordNotifyConfigWithOptions(request, runtime);
}

model AddLiveRecordVodConfigRequest {
  appName?: string(name='AppName'),
  autoCompose?: string(name='AutoCompose'),
  composeVodTranscodeGroupId?: string(name='ComposeVodTranscodeGroupId'),
  cycleDuration?: int32(name='CycleDuration'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  storageLocation?: string(name='StorageLocation'),
  streamName?: string(name='StreamName'),
  vodTranscodeGroupId?: string(name='VodTranscodeGroupId'),
}

model AddLiveRecordVodConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveRecordVodConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveRecordVodConfigResponseBody(name='body'),
}

async function addLiveRecordVodConfigWithOptions(request: AddLiveRecordVodConfigRequest, runtime: Util.RuntimeOptions): AddLiveRecordVodConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.autoCompose)) {
    query['AutoCompose'] = request.autoCompose;
  }
  if (!Util.isUnset(request.composeVodTranscodeGroupId)) {
    query['ComposeVodTranscodeGroupId'] = request.composeVodTranscodeGroupId;
  }
  if (!Util.isUnset(request.cycleDuration)) {
    query['CycleDuration'] = request.cycleDuration;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.storageLocation)) {
    query['StorageLocation'] = request.storageLocation;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.vodTranscodeGroupId)) {
    query['VodTranscodeGroupId'] = request.vodTranscodeGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveRecordVodConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveRecordVodConfig(request: AddLiveRecordVodConfigRequest): AddLiveRecordVodConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveRecordVodConfigWithOptions(request, runtime);
}

model AddLiveSnapshotDetectPornConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  interval?: int32(name='Interval'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossObject?: string(name='OssObject'),
  ownerId?: long(name='OwnerId'),
  scene?: [ string ](name='Scene'),
  securityToken?: string(name='SecurityToken'),
}

model AddLiveSnapshotDetectPornConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveSnapshotDetectPornConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveSnapshotDetectPornConfigResponseBody(name='body'),
}

async function addLiveSnapshotDetectPornConfigWithOptions(request: AddLiveSnapshotDetectPornConfigRequest, runtime: Util.RuntimeOptions): AddLiveSnapshotDetectPornConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossObject)) {
    query['OssObject'] = request.ossObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.scene)) {
    query['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveSnapshotDetectPornConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveSnapshotDetectPornConfig(request: AddLiveSnapshotDetectPornConfigRequest): AddLiveSnapshotDetectPornConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveSnapshotDetectPornConfigWithOptions(request, runtime);
}

model AddLiveSnapshotNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  notifyAuthKey?: string(name='NotifyAuthKey'),
  notifyReqAuth?: string(name='NotifyReqAuth'),
  notifyUrl?: string(name='NotifyUrl'),
  ownerId?: long(name='OwnerId'),
}

model AddLiveSnapshotNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveSnapshotNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveSnapshotNotifyConfigResponseBody(name='body'),
}

async function addLiveSnapshotNotifyConfigWithOptions(request: AddLiveSnapshotNotifyConfigRequest, runtime: Util.RuntimeOptions): AddLiveSnapshotNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.notifyAuthKey)) {
    query['NotifyAuthKey'] = request.notifyAuthKey;
  }
  if (!Util.isUnset(request.notifyReqAuth)) {
    query['NotifyReqAuth'] = request.notifyReqAuth;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveSnapshotNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveSnapshotNotifyConfig(request: AddLiveSnapshotNotifyConfigRequest): AddLiveSnapshotNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveSnapshotNotifyConfigWithOptions(request, runtime);
}

model AddLiveStreamTranscodeRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  encryptParameters?: string(name='EncryptParameters'),
  lazy?: string(name='Lazy'),
  ownerId?: long(name='OwnerId'),
  template?: string(name='Template'),
}

model AddLiveStreamTranscodeResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddLiveStreamTranscodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveStreamTranscodeResponseBody(name='body'),
}

async function addLiveStreamTranscodeWithOptions(request: AddLiveStreamTranscodeRequest, runtime: Util.RuntimeOptions): AddLiveStreamTranscodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.encryptParameters)) {
    query['EncryptParameters'] = request.encryptParameters;
  }
  if (!Util.isUnset(request.lazy)) {
    query['Lazy'] = request.lazy;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveStreamTranscode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveStreamTranscode(request: AddLiveStreamTranscodeRequest): AddLiveStreamTranscodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveStreamTranscodeWithOptions(request, runtime);
}

model AddLiveStreamWatermarkRequest {
  description?: string(name='Description'),
  height?: int32(name='Height'),
  name?: string(name='Name'),
  offsetCorner?: string(name='OffsetCorner'),
  ownerId?: long(name='OwnerId'),
  pictureUrl?: string(name='PictureUrl'),
  refHeight?: int32(name='RefHeight'),
  refWidth?: int32(name='RefWidth'),
  transparency?: int32(name='Transparency'),
  type?: int32(name='Type'),
  XOffset?: float(name='XOffset'),
  YOffset?: float(name='YOffset'),
}

model AddLiveStreamWatermarkResponseBody = {
  requestId?: string(name='RequestId'),
  templateId?: string(name='TemplateId'),
}

model AddLiveStreamWatermarkResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveStreamWatermarkResponseBody(name='body'),
}

async function addLiveStreamWatermarkWithOptions(request: AddLiveStreamWatermarkRequest, runtime: Util.RuntimeOptions): AddLiveStreamWatermarkResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.height)) {
    query['Height'] = request.height;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.offsetCorner)) {
    query['OffsetCorner'] = request.offsetCorner;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pictureUrl)) {
    query['PictureUrl'] = request.pictureUrl;
  }
  if (!Util.isUnset(request.refHeight)) {
    query['RefHeight'] = request.refHeight;
  }
  if (!Util.isUnset(request.refWidth)) {
    query['RefWidth'] = request.refWidth;
  }
  if (!Util.isUnset(request.transparency)) {
    query['Transparency'] = request.transparency;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.XOffset)) {
    query['XOffset'] = request.XOffset;
  }
  if (!Util.isUnset(request.YOffset)) {
    query['YOffset'] = request.YOffset;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveStreamWatermark',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveStreamWatermark(request: AddLiveStreamWatermarkRequest): AddLiveStreamWatermarkResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveStreamWatermarkWithOptions(request, runtime);
}

model AddLiveStreamWatermarkRuleRequest {
  app?: string(name='App'),
  description?: string(name='Description'),
  domain?: string(name='Domain'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  stream?: string(name='Stream'),
  templateId?: string(name='TemplateId'),
}

model AddLiveStreamWatermarkRuleResponseBody = {
  requestId?: string(name='RequestId'),
  ruleId?: string(name='RuleId'),
}

model AddLiveStreamWatermarkRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddLiveStreamWatermarkRuleResponseBody(name='body'),
}

async function addLiveStreamWatermarkRuleWithOptions(request: AddLiveStreamWatermarkRuleRequest, runtime: Util.RuntimeOptions): AddLiveStreamWatermarkRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddLiveStreamWatermarkRule',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addLiveStreamWatermarkRule(request: AddLiveStreamWatermarkRuleRequest): AddLiveStreamWatermarkRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return addLiveStreamWatermarkRuleWithOptions(request, runtime);
}

model AddMultiRateConfigRequest {
  app?: string(name='App'),
  avFormat?: string(name='AvFormat'),
  domainName?: string(name='DomainName'),
  groupId?: string(name='GroupId'),
  isLazy?: string(name='IsLazy'),
  isTimeAlign?: string(name='IsTimeAlign'),
  ownerId?: long(name='OwnerId'),
  templates?: string(name='Templates'),
}

model AddMultiRateConfigResponseBody = {
  body?: {
    failedTemplates?: [ 
    {
      audioBitrate?: int32(name='AudioBitrate'),
      audioChannelNum?: int32(name='AudioChannelNum'),
      audioCodec?: string(name='AudioCodec'),
      audioProfile?: string(name='AudioProfile'),
      audioRate?: int32(name='AudioRate'),
      bandWidth?: int32(name='BandWidth'),
      fps?: int32(name='Fps'),
      gop?: string(name='Gop'),
      height?: int32(name='Height'),
      profile?: int32(name='Profile'),
      template?: string(name='Template'),
      templateType?: string(name='TemplateType'),
      videoBitrate?: int32(name='VideoBitrate'),
      width?: int32(name='Width'),
    }
  ](name='FailedTemplates')
  }(name='Body'),
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model AddMultiRateConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddMultiRateConfigResponseBody(name='body'),
}

async function addMultiRateConfigWithOptions(request: AddMultiRateConfigRequest, runtime: Util.RuntimeOptions): AddMultiRateConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.avFormat)) {
    query['AvFormat'] = request.avFormat;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.isLazy)) {
    query['IsLazy'] = request.isLazy;
  }
  if (!Util.isUnset(request.isTimeAlign)) {
    query['IsTimeAlign'] = request.isTimeAlign;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.templates)) {
    query['Templates'] = request.templates;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddMultiRateConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addMultiRateConfig(request: AddMultiRateConfigRequest): AddMultiRateConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return addMultiRateConfigWithOptions(request, runtime);
}

model AddPlaylistItemsRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  programConfig?: string(name='ProgramConfig'),
  programId?: string(name='ProgramId'),
  programItems?: string(name='ProgramItems'),
}

model AddPlaylistItemsResponseBody = {
  items?: {
    failedItems?: [ 
      {
        itemId?: string(name='ItemId'),
        itemName?: string(name='ItemName'),
      }
    ](name='FailedItems'),
    successItems?: [ 
      {
        itemId?: string(name='ItemId'),
        itemName?: string(name='ItemName'),
      }
    ](name='SuccessItems'),
  }(name='Items'),
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model AddPlaylistItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddPlaylistItemsResponseBody(name='body'),
}

async function addPlaylistItemsWithOptions(request: AddPlaylistItemsRequest, runtime: Util.RuntimeOptions): AddPlaylistItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programConfig)) {
    query['ProgramConfig'] = request.programConfig;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  if (!Util.isUnset(request.programItems)) {
    query['ProgramItems'] = request.programItems;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddPlaylistItems',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addPlaylistItems(request: AddPlaylistItemsRequest): AddPlaylistItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addPlaylistItemsWithOptions(request, runtime);
}

model AddRtsLiveStreamTranscodeRequest {
  app?: string(name='App'),
  audioBitrate?: int32(name='AudioBitrate'),
  audioChannelNum?: int32(name='AudioChannelNum'),
  audioCodec?: string(name='AudioCodec'),
  audioProfile?: string(name='AudioProfile'),
  audioRate?: int32(name='AudioRate'),
  deleteBframes?: boolean(name='DeleteBframes'),
  domain?: string(name='Domain'),
  FPS?: int32(name='FPS'),
  gop?: string(name='Gop'),
  height?: int32(name='Height'),
  lazy?: string(name='Lazy'),
  opus?: boolean(name='Opus'),
  ownerId?: long(name='OwnerId'),
  profile?: int32(name='Profile'),
  template?: string(name='Template'),
  templateType?: string(name='TemplateType'),
  videoBitrate?: int32(name='VideoBitrate'),
  width?: int32(name='Width'),
}

model AddRtsLiveStreamTranscodeResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddRtsLiveStreamTranscodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddRtsLiveStreamTranscodeResponseBody(name='body'),
}

async function addRtsLiveStreamTranscodeWithOptions(request: AddRtsLiveStreamTranscodeRequest, runtime: Util.RuntimeOptions): AddRtsLiveStreamTranscodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.audioBitrate)) {
    query['AudioBitrate'] = request.audioBitrate;
  }
  if (!Util.isUnset(request.audioChannelNum)) {
    query['AudioChannelNum'] = request.audioChannelNum;
  }
  if (!Util.isUnset(request.audioCodec)) {
    query['AudioCodec'] = request.audioCodec;
  }
  if (!Util.isUnset(request.audioProfile)) {
    query['AudioProfile'] = request.audioProfile;
  }
  if (!Util.isUnset(request.audioRate)) {
    query['AudioRate'] = request.audioRate;
  }
  if (!Util.isUnset(request.deleteBframes)) {
    query['DeleteBframes'] = request.deleteBframes;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.FPS)) {
    query['FPS'] = request.FPS;
  }
  if (!Util.isUnset(request.gop)) {
    query['Gop'] = request.gop;
  }
  if (!Util.isUnset(request.height)) {
    query['Height'] = request.height;
  }
  if (!Util.isUnset(request.lazy)) {
    query['Lazy'] = request.lazy;
  }
  if (!Util.isUnset(request.opus)) {
    query['Opus'] = request.opus;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.profile)) {
    query['Profile'] = request.profile;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  if (!Util.isUnset(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  if (!Util.isUnset(request.videoBitrate)) {
    query['VideoBitrate'] = request.videoBitrate;
  }
  if (!Util.isUnset(request.width)) {
    query['Width'] = request.width;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddRtsLiveStreamTranscode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addRtsLiveStreamTranscode(request: AddRtsLiveStreamTranscodeRequest): AddRtsLiveStreamTranscodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return addRtsLiveStreamTranscodeWithOptions(request, runtime);
}

model AddShowIntoShowListRequest {
  casterId?: string(name='CasterId'),
  duration?: long(name='Duration'),
  liveInputType?: int32(name='LiveInputType'),
  ownerId?: long(name='OwnerId'),
  repeatTimes?: int32(name='RepeatTimes'),
  resourceId?: string(name='ResourceId'),
  resourceType?: string(name='ResourceType'),
  resourceUrl?: string(name='ResourceUrl'),
  showName?: string(name='ShowName'),
  spot?: int32(name='Spot'),
  isBatchMode?: boolean(name='isBatchMode'),
  showList?: [ 
    {
      duration?: long(name='duration'),
      liveInputType?: int32(name='liveInputType'),
      repeatTimes?: int32(name='repeatTimes'),
      resourceId?: string(name='resourceId'),
      resourceType?: string(name='resourceType'),
      resourceUrl?: string(name='resourceUrl'),
      showName?: string(name='showName'),
    }
  ](name='showList'),
}

model AddShowIntoShowListResponseBody = {
  requestId?: string(name='RequestId'),
  showId?: string(name='ShowId'),
  failedList?: string(name='failedList'),
  successfulShowIds?: string(name='successfulShowIds'),
}

model AddShowIntoShowListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddShowIntoShowListResponseBody(name='body'),
}

async function addShowIntoShowListWithOptions(request: AddShowIntoShowListRequest, runtime: Util.RuntimeOptions): AddShowIntoShowListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.liveInputType)) {
    query['LiveInputType'] = request.liveInputType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.repeatTimes)) {
    query['RepeatTimes'] = request.repeatTimes;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.resourceUrl)) {
    query['ResourceUrl'] = request.resourceUrl;
  }
  if (!Util.isUnset(request.showName)) {
    query['ShowName'] = request.showName;
  }
  if (!Util.isUnset(request.spot)) {
    query['Spot'] = request.spot;
  }
  if (!Util.isUnset(request.isBatchMode)) {
    query['isBatchMode'] = request.isBatchMode;
  }
  if (!Util.isUnset(request.showList)) {
    query['showList'] = request.showList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddShowIntoShowList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addShowIntoShowList(request: AddShowIntoShowListRequest): AddShowIntoShowListResponse {
  var runtime = new Util.RuntimeOptions{};
  return addShowIntoShowListWithOptions(request, runtime);
}

model AddStudioLayoutRequest {
  bgImageConfig?: string(name='BgImageConfig'),
  casterId?: string(name='CasterId'),
  commonConfig?: string(name='CommonConfig'),
  layerOrderConfigList?: string(name='LayerOrderConfigList'),
  layoutName?: string(name='LayoutName'),
  layoutType?: string(name='LayoutType'),
  mediaInputConfigList?: string(name='MediaInputConfigList'),
  ownerId?: long(name='OwnerId'),
  screenInputConfigList?: string(name='ScreenInputConfigList'),
}

model AddStudioLayoutResponseBody = {
  layoutId?: string(name='LayoutId'),
  requestId?: string(name='RequestId'),
}

model AddStudioLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddStudioLayoutResponseBody(name='body'),
}

async function addStudioLayoutWithOptions(request: AddStudioLayoutRequest, runtime: Util.RuntimeOptions): AddStudioLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bgImageConfig)) {
    query['BgImageConfig'] = request.bgImageConfig;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.commonConfig)) {
    query['CommonConfig'] = request.commonConfig;
  }
  if (!Util.isUnset(request.layerOrderConfigList)) {
    query['LayerOrderConfigList'] = request.layerOrderConfigList;
  }
  if (!Util.isUnset(request.layoutName)) {
    query['LayoutName'] = request.layoutName;
  }
  if (!Util.isUnset(request.layoutType)) {
    query['LayoutType'] = request.layoutType;
  }
  if (!Util.isUnset(request.mediaInputConfigList)) {
    query['MediaInputConfigList'] = request.mediaInputConfigList;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.screenInputConfigList)) {
    query['ScreenInputConfigList'] = request.screenInputConfigList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddStudioLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addStudioLayout(request: AddStudioLayoutRequest): AddStudioLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return addStudioLayoutWithOptions(request, runtime);
}

model AddTrancodeSEIRequest {
  appName?: string(name='AppName'),
  delay?: int32(name='Delay'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  pattern?: string(name='Pattern'),
  repeat?: int32(name='Repeat'),
  streamName?: string(name='StreamName'),
  text?: string(name='Text'),
}

model AddTrancodeSEIResponseBody = {
  requestId?: string(name='RequestId'),
}

model AddTrancodeSEIResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddTrancodeSEIResponseBody(name='body'),
}

async function addTrancodeSEIWithOptions(request: AddTrancodeSEIRequest, runtime: Util.RuntimeOptions): AddTrancodeSEIResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.delay)) {
    query['Delay'] = request.delay;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pattern)) {
    query['Pattern'] = request.pattern;
  }
  if (!Util.isUnset(request.repeat)) {
    query['Repeat'] = request.repeat;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.text)) {
    query['Text'] = request.text;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddTrancodeSEI',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addTrancodeSEI(request: AddTrancodeSEIRequest): AddTrancodeSEIResponse {
  var runtime = new Util.RuntimeOptions{};
  return addTrancodeSEIWithOptions(request, runtime);
}

model AllowPushStreamRequest {
  appId?: string(name='AppId'),
  ownerId?: long(name='OwnerId'),
  roomId?: string(name='RoomId'),
}

model AllowPushStreamResponseBody = {
  requestId?: string(name='RequestId'),
}

model AllowPushStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AllowPushStreamResponseBody(name='body'),
}

async function allowPushStreamWithOptions(request: AllowPushStreamRequest, runtime: Util.RuntimeOptions): AllowPushStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AllowPushStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function allowPushStream(request: AllowPushStreamRequest): AllowPushStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return allowPushStreamWithOptions(request, runtime);
}

model BatchDeleteLiveDomainConfigsRequest {
  domainNames?: string(name='DomainNames'),
  functionNames?: string(name='FunctionNames'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model BatchDeleteLiveDomainConfigsResponseBody = {
  requestId?: string(name='RequestId'),
}

model BatchDeleteLiveDomainConfigsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchDeleteLiveDomainConfigsResponseBody(name='body'),
}

async function batchDeleteLiveDomainConfigsWithOptions(request: BatchDeleteLiveDomainConfigsRequest, runtime: Util.RuntimeOptions): BatchDeleteLiveDomainConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainNames)) {
    query['DomainNames'] = request.domainNames;
  }
  if (!Util.isUnset(request.functionNames)) {
    query['FunctionNames'] = request.functionNames;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchDeleteLiveDomainConfigs',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchDeleteLiveDomainConfigs(request: BatchDeleteLiveDomainConfigsRequest): BatchDeleteLiveDomainConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchDeleteLiveDomainConfigsWithOptions(request, runtime);
}

model BatchSetLiveDomainConfigsRequest {
  domainNames?: string(name='DomainNames'),
  functions?: string(name='Functions'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model BatchSetLiveDomainConfigsResponseBody = {
  requestId?: string(name='RequestId'),
}

model BatchSetLiveDomainConfigsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchSetLiveDomainConfigsResponseBody(name='body'),
}

async function batchSetLiveDomainConfigsWithOptions(request: BatchSetLiveDomainConfigsRequest, runtime: Util.RuntimeOptions): BatchSetLiveDomainConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainNames)) {
    query['DomainNames'] = request.domainNames;
  }
  if (!Util.isUnset(request.functions)) {
    query['Functions'] = request.functions;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchSetLiveDomainConfigs',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchSetLiveDomainConfigs(request: BatchSetLiveDomainConfigsRequest): BatchSetLiveDomainConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchSetLiveDomainConfigsWithOptions(request, runtime);
}

model CancelMuteAllGroupUserRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
  operatorUserId?: string(name='OperatorUserId'),
}

model CancelMuteAllGroupUserResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model CancelMuteAllGroupUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CancelMuteAllGroupUserResponseBody(name='body'),
}

async function cancelMuteAllGroupUserWithOptions(request: CancelMuteAllGroupUserRequest, runtime: Util.RuntimeOptions): CancelMuteAllGroupUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.operatorUserId)) {
    body['OperatorUserId'] = request.operatorUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelMuteAllGroupUser',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelMuteAllGroupUser(request: CancelMuteAllGroupUserRequest): CancelMuteAllGroupUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelMuteAllGroupUserWithOptions(request, runtime);
}

model CloseLiveShiftRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model CloseLiveShiftResponseBody = {
  requestId?: string(name='RequestId'),
}

model CloseLiveShiftResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CloseLiveShiftResponseBody(name='body'),
}

async function closeLiveShiftWithOptions(request: CloseLiveShiftRequest, runtime: Util.RuntimeOptions): CloseLiveShiftResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloseLiveShift',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function closeLiveShift(request: CloseLiveShiftRequest): CloseLiveShiftResponse {
  var runtime = new Util.RuntimeOptions{};
  return closeLiveShiftWithOptions(request, runtime);
}

model CopyCasterRequest {
  casterName?: string(name='CasterName'),
  clientToken?: string(name='ClientToken'),
  ownerId?: long(name='OwnerId'),
  srcCasterId?: string(name='SrcCasterId'),
}

model CopyCasterResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model CopyCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CopyCasterResponseBody(name='body'),
}

async function copyCasterWithOptions(request: CopyCasterRequest, runtime: Util.RuntimeOptions): CopyCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterName)) {
    query['CasterName'] = request.casterName;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.srcCasterId)) {
    query['SrcCasterId'] = request.srcCasterId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CopyCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function copyCaster(request: CopyCasterRequest): CopyCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return copyCasterWithOptions(request, runtime);
}

model CopyCasterSceneConfigRequest {
  casterId?: string(name='CasterId'),
  fromSceneId?: string(name='FromSceneId'),
  ownerId?: long(name='OwnerId'),
  toSceneId?: string(name='ToSceneId'),
}

model CopyCasterSceneConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model CopyCasterSceneConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CopyCasterSceneConfigResponseBody(name='body'),
}

async function copyCasterSceneConfigWithOptions(request: CopyCasterSceneConfigRequest, runtime: Util.RuntimeOptions): CopyCasterSceneConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.fromSceneId)) {
    query['FromSceneId'] = request.fromSceneId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.toSceneId)) {
    query['ToSceneId'] = request.toSceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CopyCasterSceneConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function copyCasterSceneConfig(request: CopyCasterSceneConfigRequest): CopyCasterSceneConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return copyCasterSceneConfigWithOptions(request, runtime);
}

model CreateCasterRequest {
  casterName?: string(name='CasterName'),
  casterTemplate?: string(name='CasterTemplate'),
  chargeType?: string(name='ChargeType'),
  clientToken?: string(name='ClientToken'),
  expireTime?: string(name='ExpireTime'),
  normType?: int32(name='NormType'),
  ownerId?: long(name='OwnerId'),
  purchaseTime?: string(name='PurchaseTime'),
}

model CreateCasterResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model CreateCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateCasterResponseBody(name='body'),
}

async function createCasterWithOptions(request: CreateCasterRequest, runtime: Util.RuntimeOptions): CreateCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterName)) {
    query['CasterName'] = request.casterName;
  }
  if (!Util.isUnset(request.casterTemplate)) {
    query['CasterTemplate'] = request.casterTemplate;
  }
  if (!Util.isUnset(request.chargeType)) {
    query['ChargeType'] = request.chargeType;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.expireTime)) {
    query['ExpireTime'] = request.expireTime;
  }
  if (!Util.isUnset(request.normType)) {
    query['NormType'] = request.normType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.purchaseTime)) {
    query['PurchaseTime'] = request.purchaseTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCaster(request: CreateCasterRequest): CreateCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCasterWithOptions(request, runtime);
}

model CreateCustomTemplateRequest {
  customTemplate?: string(name='CustomTemplate'),
  ownerId?: long(name='OwnerId'),
  template?: string(name='Template'),
}

model CreateCustomTemplateResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateCustomTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateCustomTemplateResponseBody(name='body'),
}

async function createCustomTemplateWithOptions(request: CreateCustomTemplateRequest, runtime: Util.RuntimeOptions): CreateCustomTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.customTemplate)) {
    query['CustomTemplate'] = request.customTemplate;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCustomTemplate',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCustomTemplate(request: CreateCustomTemplateRequest): CreateCustomTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCustomTemplateWithOptions(request, runtime);
}

model CreateLiveRealTimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  logstore?: string(name='Logstore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  region?: string(name='Region'),
}

model CreateLiveRealTimeLogDeliveryResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateLiveRealTimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveRealTimeLogDeliveryResponseBody(name='body'),
}

async function createLiveRealTimeLogDeliveryWithOptions(request: CreateLiveRealTimeLogDeliveryRequest, runtime: Util.RuntimeOptions): CreateLiveRealTimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveRealTimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveRealTimeLogDelivery(request: CreateLiveRealTimeLogDeliveryRequest): CreateLiveRealTimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveRealTimeLogDeliveryWithOptions(request, runtime);
}

model CreateLiveStreamMonitorRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  inputList?: string(name='InputList'),
  monitorName?: string(name='MonitorName'),
  outputTemplate?: string(name='OutputTemplate'),
  ownerId?: long(name='OwnerId'),
  stream?: string(name='Stream'),
}

model CreateLiveStreamMonitorResponseBody = {
  monitorId?: string(name='MonitorId'),
  requestId?: string(name='RequestId'),
}

model CreateLiveStreamMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveStreamMonitorResponseBody(name='body'),
}

async function createLiveStreamMonitorWithOptions(request: CreateLiveStreamMonitorRequest, runtime: Util.RuntimeOptions): CreateLiveStreamMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.inputList)) {
    query['InputList'] = request.inputList;
  }
  if (!Util.isUnset(request.monitorName)) {
    query['MonitorName'] = request.monitorName;
  }
  if (!Util.isUnset(request.outputTemplate)) {
    query['OutputTemplate'] = request.outputTemplate;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveStreamMonitor',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveStreamMonitor(request: CreateLiveStreamMonitorRequest): CreateLiveStreamMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveStreamMonitorWithOptions(request, runtime);
}

model CreateLiveStreamRecordIndexFilesRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossObject?: string(name='OssObject'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model CreateLiveStreamRecordIndexFilesResponseBody = {
  recordInfo?: {
    appName?: string(name='AppName'),
    createTime?: string(name='CreateTime'),
    domainName?: string(name='DomainName'),
    duration?: float(name='Duration'),
    endTime?: string(name='EndTime'),
    height?: int32(name='Height'),
    ossBucket?: string(name='OssBucket'),
    ossEndpoint?: string(name='OssEndpoint'),
    ossObject?: string(name='OssObject'),
    recordId?: string(name='RecordId'),
    recordUrl?: string(name='RecordUrl'),
    startTime?: string(name='StartTime'),
    streamName?: string(name='StreamName'),
    width?: int32(name='Width'),
  }(name='RecordInfo'),
  requestId?: string(name='RequestId'),
}

model CreateLiveStreamRecordIndexFilesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveStreamRecordIndexFilesResponseBody(name='body'),
}

async function createLiveStreamRecordIndexFilesWithOptions(request: CreateLiveStreamRecordIndexFilesRequest, runtime: Util.RuntimeOptions): CreateLiveStreamRecordIndexFilesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossObject)) {
    query['OssObject'] = request.ossObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveStreamRecordIndexFiles',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveStreamRecordIndexFiles(request: CreateLiveStreamRecordIndexFilesRequest): CreateLiveStreamRecordIndexFilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveStreamRecordIndexFilesWithOptions(request, runtime);
}

model CreateLiveTranscodeTemplateRequest {
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  templateConfig?: string(name='TemplateConfig'),
  type?: string(name='Type'),
}

model CreateLiveTranscodeTemplateResponseBody = {
  requestId?: string(name='RequestId'),
  templateId?: string(name='TemplateId'),
}

model CreateLiveTranscodeTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveTranscodeTemplateResponseBody(name='body'),
}

async function createLiveTranscodeTemplateWithOptions(request: CreateLiveTranscodeTemplateRequest, runtime: Util.RuntimeOptions): CreateLiveTranscodeTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.templateConfig)) {
    query['TemplateConfig'] = request.templateConfig;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveTranscodeTemplate',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveTranscodeTemplate(request: CreateLiveTranscodeTemplateRequest): CreateLiveTranscodeTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveTranscodeTemplateWithOptions(request, runtime);
}

model CreateMessageAppRequest {
  appConfig?: map[string]string(name='AppConfig'),
  appName?: string(name='AppName'),
  extension?: map[string]string(name='Extension'),
}

model CreateMessageAppShrinkRequest {
  appConfigShrink?: string(name='AppConfig'),
  appName?: string(name='AppName'),
  extensionShrink?: string(name='Extension'),
}

model CreateMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    appId?: string(name='AppId'),
  }(name='Result'),
}

model CreateMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMessageAppResponseBody(name='body'),
}

async function createMessageAppWithOptions(tmpReq: CreateMessageAppRequest, runtime: Util.RuntimeOptions): CreateMessageAppResponse {
  Util.validateModel(tmpReq);
  var request = new CreateMessageAppShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.appConfig)) {
    request.appConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.appConfig, 'AppConfig', 'json');
  }
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appConfigShrink)) {
    body['AppConfig'] = request.appConfigShrink;
  }
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMessageApp(request: CreateMessageAppRequest): CreateMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMessageAppWithOptions(request, runtime);
}

model CreateMessageGroupRequest {
  appId?: string(name='AppId'),
  creatorId?: string(name='CreatorId'),
  extension?: map[string]string(name='Extension'),
}

model CreateMessageGroupShrinkRequest {
  appId?: string(name='AppId'),
  creatorId?: string(name='CreatorId'),
  extensionShrink?: string(name='Extension'),
}

model CreateMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    extension?: map[string]any(name='Extension'),
    groupId?: string(name='GroupId'),
  }(name='Result'),
}

model CreateMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMessageGroupResponseBody(name='body'),
}

async function createMessageGroupWithOptions(tmpReq: CreateMessageGroupRequest, runtime: Util.RuntimeOptions): CreateMessageGroupResponse {
  Util.validateModel(tmpReq);
  var request = new CreateMessageGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.creatorId)) {
    body['CreatorId'] = request.creatorId;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMessageGroup(request: CreateMessageGroupRequest): CreateMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMessageGroupWithOptions(request, runtime);
}

model CreateMixStreamRequest {
  callbackConfig?: string(name='CallbackConfig'),
  domainName?: string(name='DomainName'),
  inputStreamList?: string(name='InputStreamList'),
  layoutId?: string(name='LayoutId'),
  outputConfig?: string(name='OutputConfig'),
  ownerId?: long(name='OwnerId'),
}

model CreateMixStreamResponseBody = {
  mixStreamId?: string(name='MixStreamId'),
  requestId?: string(name='RequestId'),
}

model CreateMixStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateMixStreamResponseBody(name='body'),
}

async function createMixStreamWithOptions(request: CreateMixStreamRequest, runtime: Util.RuntimeOptions): CreateMixStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callbackConfig)) {
    query['CallbackConfig'] = request.callbackConfig;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.inputStreamList)) {
    query['InputStreamList'] = request.inputStreamList;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.outputConfig)) {
    query['OutputConfig'] = request.outputConfig;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateMixStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createMixStream(request: CreateMixStreamRequest): CreateMixStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return createMixStreamWithOptions(request, runtime);
}

model DeleteCasterRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteCasterResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model DeleteCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterResponseBody(name='body'),
}

async function deleteCasterWithOptions(request: DeleteCasterRequest, runtime: Util.RuntimeOptions): DeleteCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCaster(request: DeleteCasterRequest): DeleteCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterWithOptions(request, runtime);
}

model DeleteCasterComponentRequest {
  casterId?: string(name='CasterId'),
  componentId?: string(name='ComponentId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteCasterComponentResponseBody = {
  casterId?: string(name='CasterId'),
  componentId?: string(name='ComponentId'),
  requestId?: string(name='RequestId'),
}

model DeleteCasterComponentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterComponentResponseBody(name='body'),
}

async function deleteCasterComponentWithOptions(request: DeleteCasterComponentRequest, runtime: Util.RuntimeOptions): DeleteCasterComponentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterComponent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterComponent(request: DeleteCasterComponentRequest): DeleteCasterComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterComponentWithOptions(request, runtime);
}

model DeleteCasterEpisodeRequest {
  casterId?: string(name='CasterId'),
  episodeId?: string(name='EpisodeId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteCasterEpisodeResponseBody = {
  casterId?: string(name='CasterId'),
  episodeId?: string(name='EpisodeId'),
  requestId?: string(name='RequestId'),
}

model DeleteCasterEpisodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterEpisodeResponseBody(name='body'),
}

async function deleteCasterEpisodeWithOptions(request: DeleteCasterEpisodeRequest, runtime: Util.RuntimeOptions): DeleteCasterEpisodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.episodeId)) {
    query['EpisodeId'] = request.episodeId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterEpisode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterEpisode(request: DeleteCasterEpisodeRequest): DeleteCasterEpisodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterEpisodeWithOptions(request, runtime);
}

model DeleteCasterEpisodeGroupRequest {
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
}

model DeleteCasterEpisodeGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteCasterEpisodeGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterEpisodeGroupResponseBody(name='body'),
}

async function deleteCasterEpisodeGroupWithOptions(request: DeleteCasterEpisodeGroupRequest, runtime: Util.RuntimeOptions): DeleteCasterEpisodeGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterEpisodeGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterEpisodeGroup(request: DeleteCasterEpisodeGroupRequest): DeleteCasterEpisodeGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterEpisodeGroupWithOptions(request, runtime);
}

model DeleteCasterLayoutRequest {
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteCasterLayoutResponseBody = {
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  requestId?: string(name='RequestId'),
}

model DeleteCasterLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterLayoutResponseBody(name='body'),
}

async function deleteCasterLayoutWithOptions(request: DeleteCasterLayoutRequest, runtime: Util.RuntimeOptions): DeleteCasterLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterLayout(request: DeleteCasterLayoutRequest): DeleteCasterLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterLayoutWithOptions(request, runtime);
}

model DeleteCasterProgramRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteCasterProgramResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model DeleteCasterProgramResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterProgramResponseBody(name='body'),
}

async function deleteCasterProgramWithOptions(request: DeleteCasterProgramRequest, runtime: Util.RuntimeOptions): DeleteCasterProgramResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterProgram',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterProgram(request: DeleteCasterProgramRequest): DeleteCasterProgramResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterProgramWithOptions(request, runtime);
}

model DeleteCasterSceneConfigRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
  type?: string(name='Type'),
}

model DeleteCasterSceneConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteCasterSceneConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterSceneConfigResponseBody(name='body'),
}

async function deleteCasterSceneConfigWithOptions(request: DeleteCasterSceneConfigRequest, runtime: Util.RuntimeOptions): DeleteCasterSceneConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterSceneConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterSceneConfig(request: DeleteCasterSceneConfigRequest): DeleteCasterSceneConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterSceneConfigWithOptions(request, runtime);
}

model DeleteCasterVideoResourceRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  resourceId?: string(name='ResourceId'),
}

model DeleteCasterVideoResourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteCasterVideoResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCasterVideoResourceResponseBody(name='body'),
}

async function deleteCasterVideoResourceWithOptions(request: DeleteCasterVideoResourceRequest, runtime: Util.RuntimeOptions): DeleteCasterVideoResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCasterVideoResource',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCasterVideoResource(request: DeleteCasterVideoResourceRequest): DeleteCasterVideoResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCasterVideoResourceWithOptions(request, runtime);
}

model DeleteCustomTemplateRequest {
  ownerId?: long(name='OwnerId'),
  template?: string(name='Template'),
}

model DeleteCustomTemplateResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteCustomTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCustomTemplateResponseBody(name='body'),
}

async function deleteCustomTemplateWithOptions(request: DeleteCustomTemplateRequest, runtime: Util.RuntimeOptions): DeleteCustomTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCustomTemplate',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCustomTemplate(request: DeleteCustomTemplateRequest): DeleteCustomTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCustomTemplateWithOptions(request, runtime);
}

model DeleteLiveAppRecordConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  streamName?: string(name='StreamName'),
}

model DeleteLiveAppRecordConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveAppRecordConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveAppRecordConfigResponseBody(name='body'),
}

async function deleteLiveAppRecordConfigWithOptions(request: DeleteLiveAppRecordConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveAppRecordConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveAppRecordConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveAppRecordConfig(request: DeleteLiveAppRecordConfigRequest): DeleteLiveAppRecordConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveAppRecordConfigWithOptions(request, runtime);
}

model DeleteLiveAppSnapshotConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveAppSnapshotConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveAppSnapshotConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveAppSnapshotConfigResponseBody(name='body'),
}

async function deleteLiveAppSnapshotConfigWithOptions(request: DeleteLiveAppSnapshotConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveAppSnapshotConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveAppSnapshotConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveAppSnapshotConfig(request: DeleteLiveAppSnapshotConfigRequest): DeleteLiveAppSnapshotConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveAppSnapshotConfigWithOptions(request, runtime);
}

model DeleteLiveAudioAuditConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DeleteLiveAudioAuditConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveAudioAuditConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveAudioAuditConfigResponseBody(name='body'),
}

async function deleteLiveAudioAuditConfigWithOptions(request: DeleteLiveAudioAuditConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveAudioAuditConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveAudioAuditConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveAudioAuditConfig(request: DeleteLiveAudioAuditConfigRequest): DeleteLiveAudioAuditConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveAudioAuditConfigWithOptions(request, runtime);
}

model DeleteLiveAudioAuditNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveAudioAuditNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveAudioAuditNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveAudioAuditNotifyConfigResponseBody(name='body'),
}

async function deleteLiveAudioAuditNotifyConfigWithOptions(request: DeleteLiveAudioAuditNotifyConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveAudioAuditNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveAudioAuditNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveAudioAuditNotifyConfig(request: DeleteLiveAudioAuditNotifyConfigRequest): DeleteLiveAudioAuditNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveAudioAuditNotifyConfigWithOptions(request, runtime);
}

model DeleteLiveDetectNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveDetectNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveDetectNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveDetectNotifyConfigResponseBody(name='body'),
}

async function deleteLiveDetectNotifyConfigWithOptions(request: DeleteLiveDetectNotifyConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveDetectNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveDetectNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveDetectNotifyConfig(request: DeleteLiveDetectNotifyConfigRequest): DeleteLiveDetectNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveDetectNotifyConfigWithOptions(request, runtime);
}

model DeleteLiveDomainRequest {
  domainName?: string(name='DomainName'),
  ownerAccount?: string(name='OwnerAccount'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveDomainResponseBody(name='body'),
}

async function deleteLiveDomainWithOptions(request: DeleteLiveDomainRequest, runtime: Util.RuntimeOptions): DeleteLiveDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerAccount)) {
    query['OwnerAccount'] = request.ownerAccount;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveDomain',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveDomain(request: DeleteLiveDomainRequest): DeleteLiveDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveDomainWithOptions(request, runtime);
}

model DeleteLiveDomainMappingRequest {
  ownerId?: long(name='OwnerId'),
  pullDomain?: string(name='PullDomain'),
  pushDomain?: string(name='PushDomain'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveDomainMappingResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveDomainMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveDomainMappingResponseBody(name='body'),
}

async function deleteLiveDomainMappingWithOptions(request: DeleteLiveDomainMappingRequest, runtime: Util.RuntimeOptions): DeleteLiveDomainMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pullDomain)) {
    query['PullDomain'] = request.pullDomain;
  }
  if (!Util.isUnset(request.pushDomain)) {
    query['PushDomain'] = request.pushDomain;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveDomainMapping',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveDomainMapping(request: DeleteLiveDomainMappingRequest): DeleteLiveDomainMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveDomainMappingWithOptions(request, runtime);
}

model DeleteLiveDomainPlayMappingRequest {
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain'),
  pullDomain?: string(name='PullDomain'),
}

model DeleteLiveDomainPlayMappingResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveDomainPlayMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveDomainPlayMappingResponseBody(name='body'),
}

async function deleteLiveDomainPlayMappingWithOptions(request: DeleteLiveDomainPlayMappingRequest, runtime: Util.RuntimeOptions): DeleteLiveDomainPlayMappingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!Util.isUnset(request.pullDomain)) {
    query['PullDomain'] = request.pullDomain;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveDomainPlayMapping',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveDomainPlayMapping(request: DeleteLiveDomainPlayMappingRequest): DeleteLiveDomainPlayMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveDomainPlayMappingWithOptions(request, runtime);
}

model DeleteLiveEdgeTransferRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveEdgeTransferResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveEdgeTransferResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveEdgeTransferResponseBody(name='body'),
}

async function deleteLiveEdgeTransferWithOptions(request: DeleteLiveEdgeTransferRequest, runtime: Util.RuntimeOptions): DeleteLiveEdgeTransferResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveEdgeTransfer',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveEdgeTransfer(request: DeleteLiveEdgeTransferRequest): DeleteLiveEdgeTransferResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveEdgeTransferWithOptions(request, runtime);
}

model DeleteLiveLazyPullStreamInfoConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveLazyPullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveLazyPullStreamInfoConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveLazyPullStreamInfoConfigResponseBody(name='body'),
}

async function deleteLiveLazyPullStreamInfoConfigWithOptions(request: DeleteLiveLazyPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveLazyPullStreamInfoConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveLazyPullStreamInfoConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveLazyPullStreamInfoConfig(request: DeleteLiveLazyPullStreamInfoConfigRequest): DeleteLiveLazyPullStreamInfoConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveLazyPullStreamInfoConfigWithOptions(request, runtime);
}

model DeleteLivePullStreamInfoConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DeleteLivePullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLivePullStreamInfoConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLivePullStreamInfoConfigResponseBody(name='body'),
}

async function deleteLivePullStreamInfoConfigWithOptions(request: DeleteLivePullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): DeleteLivePullStreamInfoConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLivePullStreamInfoConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLivePullStreamInfoConfig(request: DeleteLivePullStreamInfoConfigRequest): DeleteLivePullStreamInfoConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLivePullStreamInfoConfigWithOptions(request, runtime);
}

model DeleteLiveRealTimeLogLogstoreRequest {
  logstore?: string(name='Logstore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  region?: string(name='Region'),
}

model DeleteLiveRealTimeLogLogstoreResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveRealTimeLogLogstoreResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveRealTimeLogLogstoreResponseBody(name='body'),
}

async function deleteLiveRealTimeLogLogstoreWithOptions(request: DeleteLiveRealTimeLogLogstoreRequest, runtime: Util.RuntimeOptions): DeleteLiveRealTimeLogLogstoreResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveRealTimeLogLogstore',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveRealTimeLogLogstore(request: DeleteLiveRealTimeLogLogstoreRequest): DeleteLiveRealTimeLogLogstoreResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRealTimeLogLogstoreWithOptions(request, runtime);
}

model DeleteLiveRealtimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  logstore?: string(name='Logstore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  region?: string(name='Region'),
}

model DeleteLiveRealtimeLogDeliveryResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveRealtimeLogDeliveryResponseBody(name='body'),
}

async function deleteLiveRealtimeLogDeliveryWithOptions(request: DeleteLiveRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): DeleteLiveRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveRealtimeLogDelivery(request: DeleteLiveRealtimeLogDeliveryRequest): DeleteLiveRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRealtimeLogDeliveryWithOptions(request, runtime);
}

model DeleteLiveRecordNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveRecordNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveRecordNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveRecordNotifyConfigResponseBody(name='body'),
}

async function deleteLiveRecordNotifyConfigWithOptions(request: DeleteLiveRecordNotifyConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveRecordNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveRecordNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveRecordNotifyConfig(request: DeleteLiveRecordNotifyConfigRequest): DeleteLiveRecordNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRecordNotifyConfigWithOptions(request, runtime);
}

model DeleteLiveRecordVodConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DeleteLiveRecordVodConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveRecordVodConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveRecordVodConfigResponseBody(name='body'),
}

async function deleteLiveRecordVodConfigWithOptions(request: DeleteLiveRecordVodConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveRecordVodConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveRecordVodConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveRecordVodConfig(request: DeleteLiveRecordVodConfigRequest): DeleteLiveRecordVodConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRecordVodConfigWithOptions(request, runtime);
}

model DeleteLiveSnapshotDetectPornConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveSnapshotDetectPornConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveSnapshotDetectPornConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveSnapshotDetectPornConfigResponseBody(name='body'),
}

async function deleteLiveSnapshotDetectPornConfigWithOptions(request: DeleteLiveSnapshotDetectPornConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveSnapshotDetectPornConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveSnapshotDetectPornConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveSnapshotDetectPornConfig(request: DeleteLiveSnapshotDetectPornConfigRequest): DeleteLiveSnapshotDetectPornConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveSnapshotDetectPornConfigWithOptions(request, runtime);
}

model DeleteLiveSnapshotNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveSnapshotNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveSnapshotNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveSnapshotNotifyConfigResponseBody(name='body'),
}

async function deleteLiveSnapshotNotifyConfigWithOptions(request: DeleteLiveSnapshotNotifyConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveSnapshotNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveSnapshotNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveSnapshotNotifyConfig(request: DeleteLiveSnapshotNotifyConfigRequest): DeleteLiveSnapshotNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveSnapshotNotifyConfigWithOptions(request, runtime);
}

model DeleteLiveSpecificStagingConfigRequest {
  configId?: string(name='ConfigId'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DeleteLiveSpecificStagingConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveSpecificStagingConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveSpecificStagingConfigResponseBody(name='body'),
}

async function deleteLiveSpecificStagingConfigWithOptions(request: DeleteLiveSpecificStagingConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveSpecificStagingConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configId)) {
    query['ConfigId'] = request.configId;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveSpecificStagingConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveSpecificStagingConfig(request: DeleteLiveSpecificStagingConfigRequest): DeleteLiveSpecificStagingConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveSpecificStagingConfigWithOptions(request, runtime);
}

model DeleteLiveStreamMonitorRequest {
  monitorId?: string(name='MonitorId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveStreamMonitorResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamMonitorResponseBody(name='body'),
}

async function deleteLiveStreamMonitorWithOptions(request: DeleteLiveStreamMonitorRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.monitorId)) {
    query['MonitorId'] = request.monitorId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamMonitor',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamMonitor(request: DeleteLiveStreamMonitorRequest): DeleteLiveStreamMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamMonitorWithOptions(request, runtime);
}

model DeleteLiveStreamRecordIndexFilesRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  recordId?: [ string ](name='RecordId'),
  removeFile?: string(name='RemoveFile'),
  streamName?: string(name='StreamName'),
}

model DeleteLiveStreamRecordIndexFilesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  recordDeleteInfoList?: {
    recordDeleteInfo?: [ 
    {
      message?: string(name='Message'),
      recordId?: string(name='RecordId'),
    }
  ](name='RecordDeleteInfo')
  }(name='RecordDeleteInfoList'),
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamRecordIndexFilesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamRecordIndexFilesResponseBody(name='body'),
}

async function deleteLiveStreamRecordIndexFilesWithOptions(request: DeleteLiveStreamRecordIndexFilesRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamRecordIndexFilesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recordId)) {
    query['RecordId'] = request.recordId;
  }
  if (!Util.isUnset(request.removeFile)) {
    query['RemoveFile'] = request.removeFile;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamRecordIndexFiles',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamRecordIndexFiles(request: DeleteLiveStreamRecordIndexFilesRequest): DeleteLiveStreamRecordIndexFilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamRecordIndexFilesWithOptions(request, runtime);
}

model DeleteLiveStreamTranscodeRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  template?: string(name='Template'),
}

model DeleteLiveStreamTranscodeResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamTranscodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamTranscodeResponseBody(name='body'),
}

async function deleteLiveStreamTranscodeWithOptions(request: DeleteLiveStreamTranscodeRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamTranscodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamTranscode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamTranscode(request: DeleteLiveStreamTranscodeRequest): DeleteLiveStreamTranscodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamTranscodeWithOptions(request, runtime);
}

model DeleteLiveStreamWatermarkRequest {
  ownerId?: long(name='OwnerId'),
  templateId?: string(name='TemplateId'),
}

model DeleteLiveStreamWatermarkResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamWatermarkResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamWatermarkResponseBody(name='body'),
}

async function deleteLiveStreamWatermarkWithOptions(request: DeleteLiveStreamWatermarkRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamWatermarkResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamWatermark',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamWatermark(request: DeleteLiveStreamWatermarkRequest): DeleteLiveStreamWatermarkResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamWatermarkWithOptions(request, runtime);
}

model DeleteLiveStreamWatermarkRuleRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  ownerId?: long(name='OwnerId'),
  ruleId?: string(name='RuleId'),
  stream?: string(name='Stream'),
}

model DeleteLiveStreamWatermarkRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamWatermarkRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamWatermarkRuleResponseBody(name='body'),
}

async function deleteLiveStreamWatermarkRuleWithOptions(request: DeleteLiveStreamWatermarkRuleRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamWatermarkRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamWatermarkRule',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamWatermarkRule(request: DeleteLiveStreamWatermarkRuleRequest): DeleteLiveStreamWatermarkRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamWatermarkRuleWithOptions(request, runtime);
}

model DeleteLiveStreamsNotifyUrlConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteLiveStreamsNotifyUrlConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveStreamsNotifyUrlConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveStreamsNotifyUrlConfigResponseBody(name='body'),
}

async function deleteLiveStreamsNotifyUrlConfigWithOptions(request: DeleteLiveStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): DeleteLiveStreamsNotifyUrlConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveStreamsNotifyUrlConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveStreamsNotifyUrlConfig(request: DeleteLiveStreamsNotifyUrlConfigRequest): DeleteLiveStreamsNotifyUrlConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model DeleteMessageAppRequest {
  appId?: string(name='AppId'),
}

model DeleteMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteMessageAppResponseBody(name='body'),
}

async function deleteMessageAppWithOptions(request: DeleteMessageAppRequest, runtime: Util.RuntimeOptions): DeleteMessageAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteMessageApp(request: DeleteMessageAppRequest): DeleteMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMessageAppWithOptions(request, runtime);
}

model DeleteMixStreamRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  mixStreamId?: string(name='MixStreamId'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DeleteMixStreamResponseBody = {
  mixStreamId?: string(name='MixStreamId'),
  requestId?: string(name='RequestId'),
}

model DeleteMixStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteMixStreamResponseBody(name='body'),
}

async function deleteMixStreamWithOptions(request: DeleteMixStreamRequest, runtime: Util.RuntimeOptions): DeleteMixStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.mixStreamId)) {
    query['MixStreamId'] = request.mixStreamId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMixStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteMixStream(request: DeleteMixStreamRequest): DeleteMixStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMixStreamWithOptions(request, runtime);
}

model DeleteMultiRateConfigRequest {
  app?: string(name='App'),
  deleteAll?: string(name='DeleteAll'),
  domainName?: string(name='DomainName'),
  groupId?: string(name='GroupId'),
  ownerId?: long(name='OwnerId'),
  templates?: string(name='Templates'),
}

model DeleteMultiRateConfigResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteMultiRateConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteMultiRateConfigResponseBody(name='body'),
}

async function deleteMultiRateConfigWithOptions(request: DeleteMultiRateConfigRequest, runtime: Util.RuntimeOptions): DeleteMultiRateConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.deleteAll)) {
    query['DeleteAll'] = request.deleteAll;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.templates)) {
    query['Templates'] = request.templates;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteMultiRateConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteMultiRateConfig(request: DeleteMultiRateConfigRequest): DeleteMultiRateConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMultiRateConfigWithOptions(request, runtime);
}

model DeletePlaylistRequest {
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
}

model DeletePlaylistResponseBody = {
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model DeletePlaylistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePlaylistResponseBody(name='body'),
}

async function deletePlaylistWithOptions(request: DeletePlaylistRequest, runtime: Util.RuntimeOptions): DeletePlaylistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePlaylist',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePlaylist(request: DeletePlaylistRequest): DeletePlaylistResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePlaylistWithOptions(request, runtime);
}

model DeletePlaylistItemsRequest {
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
  programItemIds?: string(name='ProgramItemIds'),
}

model DeletePlaylistItemsResponseBody = {
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model DeletePlaylistItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeletePlaylistItemsResponseBody(name='body'),
}

async function deletePlaylistItemsWithOptions(request: DeletePlaylistItemsRequest, runtime: Util.RuntimeOptions): DeletePlaylistItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  if (!Util.isUnset(request.programItemIds)) {
    query['ProgramItemIds'] = request.programItemIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeletePlaylistItems',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deletePlaylistItems(request: DeletePlaylistItemsRequest): DeletePlaylistItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deletePlaylistItemsWithOptions(request, runtime);
}

model DeleteRoomRequest {
  appId?: string(name='AppId'),
  ownerId?: long(name='OwnerId'),
  roomId?: string(name='RoomId'),
}

model DeleteRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteRoomResponseBody(name='body'),
}

async function deleteRoomWithOptions(request: DeleteRoomRequest, runtime: Util.RuntimeOptions): DeleteRoomResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRoom',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteRoom(request: DeleteRoomRequest): DeleteRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRoomWithOptions(request, runtime);
}

model DeleteSnapshotCallbackAuthRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DeleteSnapshotCallbackAuthResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteSnapshotCallbackAuthResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSnapshotCallbackAuthResponseBody(name='body'),
}

async function deleteSnapshotCallbackAuthWithOptions(request: DeleteSnapshotCallbackAuthRequest, runtime: Util.RuntimeOptions): DeleteSnapshotCallbackAuthResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSnapshotCallbackAuth',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSnapshotCallbackAuth(request: DeleteSnapshotCallbackAuthRequest): DeleteSnapshotCallbackAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSnapshotCallbackAuthWithOptions(request, runtime);
}

model DeleteSnapshotFilesRequest {
  appName?: string(name='AppName'),
  createTimestampList?: [ long ](name='CreateTimestampList'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  removeFile?: boolean(name='RemoveFile'),
  streamName?: string(name='StreamName'),
}

model DeleteSnapshotFilesResponseBody = {
  failureCount?: int32(name='FailureCount'),
  requestId?: string(name='RequestId'),
  snapshotDeleteInfoList?: {
    snapshotDeleteInfo?: [ 
    {
      createTimestamp?: long(name='CreateTimestamp'),
      message?: string(name='Message'),
    }
  ](name='SnapshotDeleteInfo')
  }(name='SnapshotDeleteInfoList'),
  successCount?: int32(name='SuccessCount'),
}

model DeleteSnapshotFilesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSnapshotFilesResponseBody(name='body'),
}

async function deleteSnapshotFilesWithOptions(request: DeleteSnapshotFilesRequest, runtime: Util.RuntimeOptions): DeleteSnapshotFilesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.createTimestampList)) {
    query['CreateTimestampList'] = request.createTimestampList;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.removeFile)) {
    query['RemoveFile'] = request.removeFile;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSnapshotFiles',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSnapshotFiles(request: DeleteSnapshotFilesRequest): DeleteSnapshotFilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSnapshotFilesWithOptions(request, runtime);
}

model DeleteStudioLayoutRequest {
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
}

model DeleteStudioLayoutResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteStudioLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteStudioLayoutResponseBody(name='body'),
}

async function deleteStudioLayoutWithOptions(request: DeleteStudioLayoutRequest, runtime: Util.RuntimeOptions): DeleteStudioLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteStudioLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteStudioLayout(request: DeleteStudioLayoutRequest): DeleteStudioLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteStudioLayoutWithOptions(request, runtime);
}

model DescribeAutoShowListTasksRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeAutoShowListTasksResponseBody = {
  autoShowListTasks?: string(name='AutoShowListTasks'),
  requestId?: string(name='RequestId'),
}

model DescribeAutoShowListTasksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAutoShowListTasksResponseBody(name='body'),
}

async function describeAutoShowListTasksWithOptions(request: DescribeAutoShowListTasksRequest, runtime: Util.RuntimeOptions): DescribeAutoShowListTasksResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAutoShowListTasks',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAutoShowListTasks(request: DescribeAutoShowListTasksRequest): DescribeAutoShowListTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAutoShowListTasksWithOptions(request, runtime);
}

model DescribeCasterChannelsRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterChannelsResponseBody = {
  channels?: {
    channel?: [ 
    {
      channelId?: string(name='ChannelId'),
      faceBeauty?: string(name='FaceBeauty'),
      resourceId?: string(name='ResourceId'),
      rtmpUrl?: string(name='RtmpUrl'),
      streamUrl?: string(name='StreamUrl'),
    }
  ](name='Channel')
  }(name='Channels'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCasterChannelsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterChannelsResponseBody(name='body'),
}

async function describeCasterChannelsWithOptions(request: DescribeCasterChannelsRequest, runtime: Util.RuntimeOptions): DescribeCasterChannelsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterChannels',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterChannels(request: DescribeCasterChannelsRequest): DescribeCasterChannelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterChannelsWithOptions(request, runtime);
}

model DescribeCasterComponentsRequest {
  casterId?: string(name='CasterId'),
  componentId?: string(name='ComponentId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterComponentsResponseBody = {
  components?: {
    component?: [ 
    {
      captionLayerContent?: {
        borderColor?: string(name='BorderColor'),
        borderWidthNormalized?: float(name='BorderWidthNormalized'),
        color?: string(name='Color'),
        fontName?: string(name='FontName'),
        lineSpaceNormalized?: float(name='LineSpaceNormalized'),
        locationId?: string(name='LocationId'),
        ptsOffset?: int32(name='PtsOffset'),
        showSourceLan?: boolean(name='ShowSourceLan'),
        sizeNormalized?: float(name='SizeNormalized'),
        sourceLan?: string(name='SourceLan'),
        targetLan?: string(name='TargetLan'),
        wordCountPerLine?: int32(name='WordCountPerLine'),
        wordSpaceNormalized?: float(name='WordSpaceNormalized'),
        wordsCount?: int32(name='WordsCount'),
      }(name='CaptionLayerContent'),
      componentId?: string(name='ComponentId'),
      componentLayer?: {
        heightNormalized?: float(name='HeightNormalized'),
        positionNormalizeds?: {
          position?: [ float ](name='Position')
        }(name='PositionNormalizeds'),
        positionRefer?: string(name='PositionRefer'),
        transparency?: int32(name='Transparency'),
        widthNormalized?: float(name='WidthNormalized'),
      }(name='ComponentLayer'),
      componentName?: string(name='ComponentName'),
      componentType?: string(name='ComponentType'),
      effect?: string(name='Effect'),
      imageLayerContent?: {
        materialId?: string(name='MaterialId'),
      }(name='ImageLayerContent'),
      locationId?: string(name='LocationId'),
      textLayerContent?: {
        borderColor?: string(name='BorderColor'),
        borderWidthNormalized?: float(name='BorderWidthNormalized'),
        color?: string(name='Color'),
        fontName?: string(name='FontName'),
        sizeNormalized?: float(name='SizeNormalized'),
        text?: string(name='Text'),
      }(name='TextLayerContent'),
    }
  ](name='Component')
  }(name='Components'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCasterComponentsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterComponentsResponseBody(name='body'),
}

async function describeCasterComponentsWithOptions(request: DescribeCasterComponentsRequest, runtime: Util.RuntimeOptions): DescribeCasterComponentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterComponents',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterComponents(request: DescribeCasterComponentsRequest): DescribeCasterComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterComponentsWithOptions(request, runtime);
}

model DescribeCasterConfigRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterConfigResponseBody = {
  callbackUrl?: string(name='CallbackUrl'),
  casterId?: string(name='CasterId'),
  casterName?: string(name='CasterName'),
  channelEnable?: int32(name='ChannelEnable'),
  delay?: float(name='Delay'),
  domainName?: string(name='DomainName'),
  programEffect?: int32(name='ProgramEffect'),
  programName?: string(name='ProgramName'),
  recordConfig?: {
    ossBucket?: string(name='OssBucket'),
    ossEndpoint?: string(name='OssEndpoint'),
    recordFormat?: {
      recordFormat?: [ 
      {
        cycleDuration?: int32(name='CycleDuration'),
        format?: string(name='Format'),
        ossObjectPrefix?: string(name='OssObjectPrefix'),
        sliceOssObjectPrefix?: string(name='SliceOssObjectPrefix'),
      }
    ](name='RecordFormat')
    }(name='RecordFormat'),
  }(name='RecordConfig'),
  requestId?: string(name='RequestId'),
  sideOutputUrl?: string(name='SideOutputUrl'),
  sideOutputUrlList?: string(name='SideOutputUrlList'),
  syncGroupsConfig?: {
    syncGroup?: [ 
    {
      hostResourceId?: string(name='HostResourceId'),
      mode?: int32(name='Mode'),
      resourceIds?: {
        resourceId?: [ string ](name='ResourceId')
      }(name='ResourceIds'),
    }
  ](name='SyncGroup')
  }(name='SyncGroupsConfig'),
  transcodeConfig?: {
    casterTemplate?: string(name='CasterTemplate'),
    liveTemplateIds?: {
      locationId?: [ string ](name='LocationId')
    }(name='LiveTemplateIds'),
  }(name='TranscodeConfig'),
  urgentLiveStreamUrl?: string(name='UrgentLiveStreamUrl'),
  urgentMaterialId?: string(name='UrgentMaterialId'),
}

model DescribeCasterConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterConfigResponseBody(name='body'),
}

async function describeCasterConfigWithOptions(request: DescribeCasterConfigRequest, runtime: Util.RuntimeOptions): DescribeCasterConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterConfig(request: DescribeCasterConfigRequest): DescribeCasterConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterConfigWithOptions(request, runtime);
}

model DescribeCasterLayoutsRequest {
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterLayoutsResponseBody = {
  layouts?: {
    layout?: [ 
    {
      audioLayers?: {
        audioLayer?: [ 
        {
          fixedDelayDuration?: int32(name='FixedDelayDuration'),
          validChannel?: string(name='ValidChannel'),
          volumeRate?: float(name='VolumeRate'),
        }
      ](name='AudioLayer')
      }(name='AudioLayers'),
      blendList?: {
        locationId?: [ string ](name='LocationId')
      }(name='BlendList'),
      layoutId?: string(name='LayoutId'),
      mixList?: {
        locationId?: [ string ](name='LocationId')
      }(name='MixList'),
      videoLayers?: {
        videoLayer?: [ 
        {
          fillMode?: string(name='FillMode'),
          fixedDelayDuration?: int32(name='FixedDelayDuration'),
          heightNormalized?: float(name='HeightNormalized'),
          positionNormalizeds?: {
            position?: [ float ](name='Position')
          }(name='PositionNormalizeds'),
          positionRefer?: string(name='PositionRefer'),
          widthNormalized?: float(name='WidthNormalized'),
        }
      ](name='VideoLayer')
      }(name='VideoLayers'),
    }
  ](name='Layout')
  }(name='Layouts'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCasterLayoutsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterLayoutsResponseBody(name='body'),
}

async function describeCasterLayoutsWithOptions(request: DescribeCasterLayoutsRequest, runtime: Util.RuntimeOptions): DescribeCasterLayoutsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterLayouts',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterLayouts(request: DescribeCasterLayoutsRequest): DescribeCasterLayoutsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterLayoutsWithOptions(request, runtime);
}

model DescribeCasterProgramRequest {
  casterId?: string(name='CasterId'),
  endTime?: string(name='EndTime'),
  episodeId?: string(name='EpisodeId'),
  episodeType?: string(name='EpisodeType'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime'),
  status?: int32(name='Status'),
}

model DescribeCasterProgramResponseBody = {
  casterId?: string(name='CasterId'),
  episodes?: {
    episode?: [ 
    {
      componentIds?: {
        componentId?: [ string ](name='ComponentId')
      }(name='ComponentIds'),
      endTime?: string(name='EndTime'),
      episodeId?: string(name='EpisodeId'),
      episodeName?: string(name='EpisodeName'),
      episodeType?: string(name='EpisodeType'),
      resourceId?: string(name='ResourceId'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
      switchType?: string(name='SwitchType'),
    }
  ](name='Episode')
  }(name='Episodes'),
  programEffect?: int32(name='ProgramEffect'),
  programName?: string(name='ProgramName'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCasterProgramResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterProgramResponseBody(name='body'),
}

async function describeCasterProgramWithOptions(request: DescribeCasterProgramRequest, runtime: Util.RuntimeOptions): DescribeCasterProgramResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.episodeId)) {
    query['EpisodeId'] = request.episodeId;
  }
  if (!Util.isUnset(request.episodeType)) {
    query['EpisodeType'] = request.episodeType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterProgram',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterProgram(request: DescribeCasterProgramRequest): DescribeCasterProgramResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterProgramWithOptions(request, runtime);
}

model DescribeCasterSceneAudioRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model DescribeCasterSceneAudioResponseBody = {
  audioLayers?: {
    audioLayer?: [ 
    {
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      validChannel?: string(name='ValidChannel'),
      volumeRate?: float(name='VolumeRate'),
    }
  ](name='AudioLayer')
  }(name='AudioLayers'),
  casterId?: string(name='CasterId'),
  followEnable?: int32(name='FollowEnable'),
  mixList?: {
    locationId?: [ string ](name='LocationId')
  }(name='MixList'),
  requestId?: string(name='RequestId'),
}

model DescribeCasterSceneAudioResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterSceneAudioResponseBody(name='body'),
}

async function describeCasterSceneAudioWithOptions(request: DescribeCasterSceneAudioRequest, runtime: Util.RuntimeOptions): DescribeCasterSceneAudioResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterSceneAudio',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterSceneAudio(request: DescribeCasterSceneAudioRequest): DescribeCasterSceneAudioResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterSceneAudioWithOptions(request, runtime);
}

model DescribeCasterScenesRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model DescribeCasterScenesResponseBody = {
  requestId?: string(name='RequestId'),
  sceneList?: {
    scene?: [ 
    {
      componentIds?: {
        componentId?: [ string ](name='componentId')
      }(name='ComponentIds'),
      layoutId?: string(name='LayoutId'),
      outputType?: string(name='OutputType'),
      sceneId?: string(name='SceneId'),
      sceneName?: string(name='SceneName'),
      status?: int32(name='Status'),
      streamInfos?: {
        streamInfo?: [ 
        {
          outputStreamUrl?: string(name='OutputStreamUrl'),
          transcodeConfig?: string(name='TranscodeConfig'),
          videoFormat?: string(name='VideoFormat'),
        }
      ](name='StreamInfo')
      }(name='StreamInfos'),
      streamUrl?: string(name='StreamUrl'),
    }
  ](name='Scene')
  }(name='SceneList'),
  total?: int32(name='Total'),
}

model DescribeCasterScenesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterScenesResponseBody(name='body'),
}

async function describeCasterScenesWithOptions(request: DescribeCasterScenesRequest, runtime: Util.RuntimeOptions): DescribeCasterScenesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterScenes',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterScenes(request: DescribeCasterScenesRequest): DescribeCasterScenesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterScenesWithOptions(request, runtime);
}

model DescribeCasterStreamUrlRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterStreamUrlResponseBody = {
  casterId?: string(name='CasterId'),
  casterStreams?: {
    casterStream?: [ 
    {
      outputType?: int32(name='OutputType'),
      rtmpUrl?: string(name='RtmpUrl'),
      sceneId?: string(name='SceneId'),
      streamInfos?: {
        streamInfo?: [ 
        {
          outputStreamUrl?: string(name='OutputStreamUrl'),
          transcodeConfig?: string(name='TranscodeConfig'),
          videoFormat?: string(name='VideoFormat'),
        }
      ](name='StreamInfo')
      }(name='StreamInfos'),
      streamUrl?: string(name='StreamUrl'),
    }
  ](name='CasterStream')
  }(name='CasterStreams'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCasterStreamUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterStreamUrlResponseBody(name='body'),
}

async function describeCasterStreamUrlWithOptions(request: DescribeCasterStreamUrlRequest, runtime: Util.RuntimeOptions): DescribeCasterStreamUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterStreamUrl',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterStreamUrl(request: DescribeCasterStreamUrlRequest): DescribeCasterStreamUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterStreamUrlWithOptions(request, runtime);
}

model DescribeCasterSyncGroupRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterSyncGroupResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
  syncGroups?: {
    syncGroup?: [ 
    {
      hostResourceId?: string(name='HostResourceId'),
      mode?: int32(name='Mode'),
      resourceIds?: {
        resourceId?: [ string ](name='ResourceId')
      }(name='ResourceIds'),
    }
  ](name='SyncGroup')
  }(name='SyncGroups'),
}

model DescribeCasterSyncGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterSyncGroupResponseBody(name='body'),
}

async function describeCasterSyncGroupWithOptions(request: DescribeCasterSyncGroupRequest, runtime: Util.RuntimeOptions): DescribeCasterSyncGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterSyncGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterSyncGroup(request: DescribeCasterSyncGroupRequest): DescribeCasterSyncGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterSyncGroupWithOptions(request, runtime);
}

model DescribeCasterVideoResourcesRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeCasterVideoResourcesResponseBody = {
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
  videoResources?: {
    videoResource?: [ 
    {
      beginOffset?: int32(name='BeginOffset'),
      endOffset?: int32(name='EndOffset'),
      flvUrl?: string(name='FlvUrl'),
      liveStreamUrl?: string(name='LiveStreamUrl'),
      locationId?: string(name='LocationId'),
      materialId?: string(name='MaterialId'),
      ptsCallbackInterval?: int32(name='PtsCallbackInterval'),
      repeatNum?: int32(name='RepeatNum'),
      resourceId?: string(name='ResourceId'),
      resourceName?: string(name='ResourceName'),
      vodUrl?: string(name='VodUrl'),
    }
  ](name='VideoResource')
  }(name='VideoResources'),
}

model DescribeCasterVideoResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCasterVideoResourcesResponseBody(name='body'),
}

async function describeCasterVideoResourcesWithOptions(request: DescribeCasterVideoResourcesRequest, runtime: Util.RuntimeOptions): DescribeCasterVideoResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasterVideoResources',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasterVideoResources(request: DescribeCasterVideoResourcesRequest): DescribeCasterVideoResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCasterVideoResourcesWithOptions(request, runtime);
}

model DescribeCastersRequest {
  casterId?: string(name='CasterId'),
  casterName?: string(name='CasterName'),
  chargeType?: int32(name='ChargeType'),
  endTime?: string(name='EndTime'),
  normType?: string(name='NormType'),
  orderByModifyAsc?: string(name='OrderByModifyAsc'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime'),
  status?: int32(name='Status'),
}

model DescribeCastersResponseBody = {
  casterList?: {
    caster?: [ 
    {
      casterId?: string(name='CasterId'),
      casterName?: string(name='CasterName'),
      casterTemplate?: string(name='CasterTemplate'),
      channelEnable?: int32(name='ChannelEnable'),
      chargeType?: string(name='ChargeType'),
      createTime?: string(name='CreateTime'),
      duration?: string(name='Duration'),
      expireTime?: string(name='ExpireTime'),
      lastModified?: string(name='LastModified'),
      normType?: int32(name='NormType'),
      purchaseTime?: string(name='PurchaseTime'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
    }
  ](name='Caster')
  }(name='CasterList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeCastersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCastersResponseBody(name='body'),
}

async function describeCastersWithOptions(request: DescribeCastersRequest, runtime: Util.RuntimeOptions): DescribeCastersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.casterName)) {
    query['CasterName'] = request.casterName;
  }
  if (!Util.isUnset(request.chargeType)) {
    query['ChargeType'] = request.chargeType;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.normType)) {
    query['NormType'] = request.normType;
  }
  if (!Util.isUnset(request.orderByModifyAsc)) {
    query['OrderByModifyAsc'] = request.orderByModifyAsc;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCasters',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCasters(request: DescribeCastersRequest): DescribeCastersResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCastersWithOptions(request, runtime);
}

model DescribeDomainUsageDataRequest {
  area?: string(name='Area'),
  dataProtocol?: string(name='DataProtocol'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  field?: string(name='Field'),
  interval?: string(name='Interval'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
  type?: string(name='Type'),
}

model DescribeDomainUsageDataResponseBody = {
  area?: string(name='Area'),
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  type?: string(name='Type'),
  usageDataPerInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      value?: string(name='Value'),
    }
  ](name='DataModule')
  }(name='UsageDataPerInterval'),
}

model DescribeDomainUsageDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDomainUsageDataResponseBody(name='body'),
}

async function describeDomainUsageDataWithOptions(request: DescribeDomainUsageDataRequest, runtime: Util.RuntimeOptions): DescribeDomainUsageDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.area)) {
    query['Area'] = request.area;
  }
  if (!Util.isUnset(request.dataProtocol)) {
    query['DataProtocol'] = request.dataProtocol;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.field)) {
    query['Field'] = request.field;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDomainUsageData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDomainUsageData(request: DescribeDomainUsageDataRequest): DescribeDomainUsageDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainUsageDataWithOptions(request, runtime);
}

model DescribeDomainWithIntegrityRequest {
  endTime?: string(name='EndTime'),
  integrity?: float(name='Integrity'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeDomainWithIntegrityResponseBody = {
  content?: [ 
    {
      columns?: [ string ](name='Columns'),
      name?: string(name='Name'),
      points?: [ string ](name='Points'),
    }
  ](name='Content'),
  requestId?: string(name='RequestId'),
}

model DescribeDomainWithIntegrityResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDomainWithIntegrityResponseBody(name='body'),
}

async function describeDomainWithIntegrityWithOptions(request: DescribeDomainWithIntegrityRequest, runtime: Util.RuntimeOptions): DescribeDomainWithIntegrityResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDomainWithIntegrity',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDomainWithIntegrity(request: DescribeDomainWithIntegrityRequest): DescribeDomainWithIntegrityResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDomainWithIntegrityWithOptions(request, runtime);
}

model DescribeForbidPushStreamRoomListRequest {
  appId?: string(name='AppId'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model DescribeForbidPushStreamRoomListResponseBody = {
  requestId?: string(name='RequestId'),
  roomList?: [ 
    {
      anchorId?: string(name='AnchorId'),
      opEndTime?: string(name='OpEndTime'),
      opStartTime?: string(name='OpStartTime'),
      roomId?: string(name='RoomId'),
    }
  ](name='RoomList'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeForbidPushStreamRoomListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeForbidPushStreamRoomListResponseBody(name='body'),
}

async function describeForbidPushStreamRoomListWithOptions(request: DescribeForbidPushStreamRoomListRequest, runtime: Util.RuntimeOptions): DescribeForbidPushStreamRoomListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeForbidPushStreamRoomList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeForbidPushStreamRoomList(request: DescribeForbidPushStreamRoomListRequest): DescribeForbidPushStreamRoomListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeForbidPushStreamRoomListWithOptions(request, runtime);
}

model DescribeHlsLiveStreamRealTimeBpsDataRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  time?: string(name='Time'),
}

model DescribeHlsLiveStreamRealTimeBpsDataResponseBody = {
  requestId?: string(name='RequestId'),
  time?: string(name='Time'),
  usageData?: [ 
    {
      domainName?: string(name='DomainName'),
      streamInfos?: [ 
        {
          infos?: [ 
            {
              downFlow?: float(name='DownFlow'),
              online?: float(name='Online'),
              rate?: string(name='Rate'),
            }
          ](name='Infos'),
          streamName?: string(name='StreamName'),
        }
      ](name='StreamInfos'),
    }
  ](name='UsageData'),
}

model DescribeHlsLiveStreamRealTimeBpsDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeHlsLiveStreamRealTimeBpsDataResponseBody(name='body'),
}

async function describeHlsLiveStreamRealTimeBpsDataWithOptions(request: DescribeHlsLiveStreamRealTimeBpsDataRequest, runtime: Util.RuntimeOptions): DescribeHlsLiveStreamRealTimeBpsDataResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHlsLiveStreamRealTimeBpsData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeHlsLiveStreamRealTimeBpsData(request: DescribeHlsLiveStreamRealTimeBpsDataRequest): DescribeHlsLiveStreamRealTimeBpsDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHlsLiveStreamRealTimeBpsDataWithOptions(request, runtime);
}

model DescribeLiveAudioAuditConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveAudioAuditConfigResponseBody = {
  liveAudioAuditConfigList?: {
    liveAudioAuditConfig?: [ 
    {
      appName?: string(name='AppName'),
      bizType?: string(name='BizType'),
      domainName?: string(name='DomainName'),
      scenes?: {
        scene?: [ string ](name='scene')
      }(name='Scenes'),
      streamName?: string(name='StreamName'),
    }
  ](name='LiveAudioAuditConfig')
  }(name='LiveAudioAuditConfigList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveAudioAuditConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveAudioAuditConfigResponseBody(name='body'),
}

async function describeLiveAudioAuditConfigWithOptions(request: DescribeLiveAudioAuditConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveAudioAuditConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveAudioAuditConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveAudioAuditConfig(request: DescribeLiveAudioAuditConfigRequest): DescribeLiveAudioAuditConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveAudioAuditConfigWithOptions(request, runtime);
}

model DescribeLiveAudioAuditNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveAudioAuditNotifyConfigResponseBody = {
  liveAudioAuditNotifyConfigList?: {
    liveAudioAuditNotifyConfig?: [ 
    {
      callback?: string(name='Callback'),
      callbackTemplate?: string(name='CallbackTemplate'),
      domainName?: string(name='DomainName'),
    }
  ](name='LiveAudioAuditNotifyConfig')
  }(name='LiveAudioAuditNotifyConfigList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveAudioAuditNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveAudioAuditNotifyConfigResponseBody(name='body'),
}

async function describeLiveAudioAuditNotifyConfigWithOptions(request: DescribeLiveAudioAuditNotifyConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveAudioAuditNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveAudioAuditNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveAudioAuditNotifyConfig(request: DescribeLiveAudioAuditNotifyConfigRequest): DescribeLiveAudioAuditNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveAudioAuditNotifyConfigWithOptions(request, runtime);
}

model DescribeLiveCertificateDetailRequest {
  certName?: string(name='CertName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveCertificateDetailResponseBody = {
  cert?: string(name='Cert'),
  certId?: long(name='CertId'),
  certName?: string(name='CertName'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveCertificateDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveCertificateDetailResponseBody(name='body'),
}

async function describeLiveCertificateDetailWithOptions(request: DescribeLiveCertificateDetailRequest, runtime: Util.RuntimeOptions): DescribeLiveCertificateDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.certName)) {
    query['CertName'] = request.certName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveCertificateDetail',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveCertificateDetail(request: DescribeLiveCertificateDetailRequest): DescribeLiveCertificateDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveCertificateDetailWithOptions(request, runtime);
}

model DescribeLiveCertificateListRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveCertificateListResponseBody = {
  certificateListModel?: {
    certList?: {
      cert?: [ 
      {
        certId?: long(name='CertId'),
        certName?: string(name='CertName'),
        common?: string(name='Common'),
        fingerprint?: string(name='Fingerprint'),
        issuer?: string(name='Issuer'),
        lastTime?: long(name='LastTime'),
      }
    ](name='Cert')
    }(name='CertList'),
    count?: int32(name='Count'),
  }(name='CertificateListModel'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveCertificateListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveCertificateListResponseBody(name='body'),
}

async function describeLiveCertificateListWithOptions(request: DescribeLiveCertificateListRequest, runtime: Util.RuntimeOptions): DescribeLiveCertificateListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveCertificateList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveCertificateList(request: DescribeLiveCertificateListRequest): DescribeLiveCertificateListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveCertificateListWithOptions(request, runtime);
}

model DescribeLiveDetectNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveDetectNotifyConfigResponseBody = {
  liveDetectNotifyConfig?: {
    domainName?: string(name='DomainName'),
    notifyUrl?: string(name='NotifyUrl'),
  }(name='LiveDetectNotifyConfig'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDetectNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDetectNotifyConfigResponseBody(name='body'),
}

async function describeLiveDetectNotifyConfigWithOptions(request: DescribeLiveDetectNotifyConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveDetectNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDetectNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDetectNotifyConfig(request: DescribeLiveDetectNotifyConfigRequest): DescribeLiveDetectNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDetectNotifyConfigWithOptions(request, runtime);
}

model DescribeLiveDetectPornDataRequest {
  app?: string(name='App'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  fee?: string(name='Fee'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region'),
  scene?: string(name='Scene'),
  splitBy?: string(name='SplitBy'),
  startTime?: string(name='StartTime'),
  stream?: string(name='Stream'),
}

model DescribeLiveDetectPornDataResponseBody = {
  detectPornData?: {
    dataModule?: [ 
    {
      app?: string(name='App'),
      count?: long(name='Count'),
      domain?: string(name='Domain'),
      fee?: string(name='Fee'),
      region?: string(name='Region'),
      scene?: string(name='Scene'),
      stream?: string(name='Stream'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='DataModule')
  }(name='DetectPornData'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDetectPornDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDetectPornDataResponseBody(name='body'),
}

async function describeLiveDetectPornDataWithOptions(request: DescribeLiveDetectPornDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDetectPornDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.fee)) {
    query['Fee'] = request.fee;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.scene)) {
    query['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.splitBy)) {
    query['SplitBy'] = request.splitBy;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDetectPornData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDetectPornData(request: DescribeLiveDetectPornDataRequest): DescribeLiveDetectPornDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDetectPornDataWithOptions(request, runtime);
}

model DescribeLiveDomainBpsDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainBpsDataResponseBody = {
  bpsDataPerInterval?: {
    dataModule?: [ 
    {
      bpsValue?: string(name='BpsValue'),
      httpBpsValue?: string(name='HttpBpsValue'),
      httpsBpsValue?: string(name='HttpsBpsValue'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='DataModule')
  }(name='BpsDataPerInterval'),
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainBpsDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainBpsDataResponseBody(name='body'),
}

async function describeLiveDomainBpsDataWithOptions(request: DescribeLiveDomainBpsDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainBpsDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainBpsData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainBpsData(request: DescribeLiveDomainBpsDataRequest): DescribeLiveDomainBpsDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainBpsDataWithOptions(request, runtime);
}

model DescribeLiveDomainBpsDataByLayerRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ispNameEn?: string(name='IspNameEn'),
  layer?: string(name='Layer'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainBpsDataByLayerResponseBody = {
  bpsDataInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      trafficValue?: string(name='TrafficValue'),
      value?: string(name='Value'),
    }
  ](name='DataModule')
  }(name='BpsDataInterval'),
  dataInterval?: string(name='DataInterval'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainBpsDataByLayerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainBpsDataByLayerResponseBody(name='body'),
}

async function describeLiveDomainBpsDataByLayerWithOptions(request: DescribeLiveDomainBpsDataByLayerRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainBpsDataByLayerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.layer)) {
    query['Layer'] = request.layer;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainBpsDataByLayer',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainBpsDataByLayer(request: DescribeLiveDomainBpsDataByLayerRequest): DescribeLiveDomainBpsDataByLayerResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainBpsDataByLayerWithOptions(request, runtime);
}

model DescribeLiveDomainBpsDataByTimeStampRequest {
  domainName?: string(name='DomainName'),
  ispNames?: string(name='IspNames'),
  locationNames?: string(name='LocationNames'),
  ownerId?: long(name='OwnerId'),
  timePoint?: string(name='TimePoint'),
}

model DescribeLiveDomainBpsDataByTimeStampResponseBody = {
  bpsDataList?: {
    bpsDataModel?: [ 
    {
      bps?: long(name='Bps'),
      ispName?: string(name='IspName'),
      locationName?: string(name='LocationName'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='BpsDataModel')
  }(name='BpsDataList'),
  domainName?: string(name='DomainName'),
  requestId?: string(name='RequestId'),
  timeStamp?: string(name='TimeStamp'),
}

model DescribeLiveDomainBpsDataByTimeStampResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainBpsDataByTimeStampResponseBody(name='body'),
}

async function describeLiveDomainBpsDataByTimeStampWithOptions(request: DescribeLiveDomainBpsDataByTimeStampRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainBpsDataByTimeStampResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ispNames)) {
    query['IspNames'] = request.ispNames;
  }
  if (!Util.isUnset(request.locationNames)) {
    query['LocationNames'] = request.locationNames;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.timePoint)) {
    query['TimePoint'] = request.timePoint;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainBpsDataByTimeStamp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainBpsDataByTimeStamp(request: DescribeLiveDomainBpsDataByTimeStampRequest): DescribeLiveDomainBpsDataByTimeStampResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainBpsDataByTimeStampWithOptions(request, runtime);
}

model DescribeLiveDomainCertificateInfoRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveDomainCertificateInfoResponseBody = {
  certInfos?: {
    certInfo?: [ 
    {
      certDomainName?: string(name='CertDomainName'),
      certExpireTime?: string(name='CertExpireTime'),
      certLife?: string(name='CertLife'),
      certName?: string(name='CertName'),
      certOrg?: string(name='CertOrg'),
      certType?: string(name='CertType'),
      domainName?: string(name='DomainName'),
      SSLProtocol?: string(name='SSLProtocol'),
      SSLPub?: string(name='SSLPub'),
      status?: string(name='Status'),
    }
  ](name='CertInfo')
  }(name='CertInfos'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainCertificateInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainCertificateInfoResponseBody(name='body'),
}

async function describeLiveDomainCertificateInfoWithOptions(request: DescribeLiveDomainCertificateInfoRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainCertificateInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainCertificateInfo',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainCertificateInfo(request: DescribeLiveDomainCertificateInfoRequest): DescribeLiveDomainCertificateInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainCertificateInfoWithOptions(request, runtime);
}

model DescribeLiveDomainConfigsRequest {
  domainName?: string(name='DomainName'),
  functionNames?: string(name='FunctionNames'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveDomainConfigsResponseBody = {
  domainConfigs?: {
    domainConfig?: [ 
    {
      configId?: string(name='ConfigId'),
      functionArgs?: {
        functionArg?: [ 
        {
          argName?: string(name='ArgName'),
          argValue?: string(name='ArgValue'),
        }
      ](name='FunctionArg')
      }(name='FunctionArgs'),
      functionName?: string(name='FunctionName'),
      status?: string(name='Status'),
    }
  ](name='DomainConfig')
  }(name='DomainConfigs'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainConfigsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainConfigsResponseBody(name='body'),
}

async function describeLiveDomainConfigsWithOptions(request: DescribeLiveDomainConfigsRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.functionNames)) {
    query['FunctionNames'] = request.functionNames;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainConfigs',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainConfigs(request: DescribeLiveDomainConfigsRequest): DescribeLiveDomainConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainConfigsWithOptions(request, runtime);
}

model DescribeLiveDomainDetailRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveDomainDetailResponseBody = {
  domainDetail?: {
    certName?: string(name='CertName'),
    cname?: string(name='Cname'),
    description?: string(name='Description'),
    domainName?: string(name='DomainName'),
    domainStatus?: string(name='DomainStatus'),
    gmtCreated?: string(name='GmtCreated'),
    gmtModified?: string(name='GmtModified'),
    liveDomainType?: string(name='LiveDomainType'),
    region?: string(name='Region'),
    SSLProtocol?: string(name='SSLProtocol'),
    SSLPub?: string(name='SSLPub'),
    scope?: string(name='Scope'),
  }(name='DomainDetail'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainDetailResponseBody(name='body'),
}

async function describeLiveDomainDetailWithOptions(request: DescribeLiveDomainDetailRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainDetail',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainDetail(request: DescribeLiveDomainDetailRequest): DescribeLiveDomainDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainDetailWithOptions(request, runtime);
}

model DescribeLiveDomainFrameRateAndBitRateDataRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  queryTime?: string(name='QueryTime'),
}

model DescribeLiveDomainFrameRateAndBitRateDataResponseBody = {
  frameRateAndBitRateInfos?: {
    frameRateAndBitRateInfo?: [ 
    {
      audioFrameRate?: float(name='AudioFrameRate'),
      bitRate?: float(name='BitRate'),
      streamUrl?: string(name='StreamUrl'),
      videoFrameRate?: float(name='VideoFrameRate'),
    }
  ](name='FrameRateAndBitRateInfo')
  }(name='FrameRateAndBitRateInfos'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainFrameRateAndBitRateDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainFrameRateAndBitRateDataResponseBody(name='body'),
}

async function describeLiveDomainFrameRateAndBitRateDataWithOptions(request: DescribeLiveDomainFrameRateAndBitRateDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainFrameRateAndBitRateDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.queryTime)) {
    query['QueryTime'] = request.queryTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainFrameRateAndBitRateData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainFrameRateAndBitRateData(request: DescribeLiveDomainFrameRateAndBitRateDataRequest): DescribeLiveDomainFrameRateAndBitRateDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainFrameRateAndBitRateDataWithOptions(request, runtime);
}

model DescribeLiveDomainLimitRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveDomainLimitResponseBody = {
  liveDomainLimitList?: {
    liveDomainLimit?: [ 
    {
      domainName?: string(name='DomainName'),
      limitNum?: int32(name='LimitNum'),
      limitTranscodeNum?: int32(name='LimitTranscodeNum'),
      limitTransferNum?: int32(name='LimitTransferNum'),
    }
  ](name='LiveDomainLimit')
  }(name='LiveDomainLimitList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainLimitResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainLimitResponseBody(name='body'),
}

async function describeLiveDomainLimitWithOptions(request: DescribeLiveDomainLimitRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainLimitResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainLimit',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainLimit(request: DescribeLiveDomainLimitRequest): DescribeLiveDomainLimitResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainLimitWithOptions(request, runtime);
}

model DescribeLiveDomainLogRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainLogResponseBody = {
  domainLogDetails?: {
    domainLogDetail?: [ 
    {
      logCount?: long(name='LogCount'),
      logInfos?: {
        logInfoDetail?: [ 
        {
          endTime?: string(name='EndTime'),
          logName?: string(name='LogName'),
          logPath?: string(name='LogPath'),
          logSize?: long(name='LogSize'),
          startTime?: string(name='StartTime'),
        }
      ](name='LogInfoDetail')
      }(name='LogInfos'),
      pageInfos?: {
        pageIndex?: long(name='PageIndex'),
        pageSize?: long(name='PageSize'),
        total?: long(name='Total'),
      }(name='PageInfos'),
    }
  ](name='DomainLogDetail')
  }(name='DomainLogDetails'),
  domainName?: string(name='DomainName'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainLogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainLogResponseBody(name='body'),
}

async function describeLiveDomainLogWithOptions(request: DescribeLiveDomainLogRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainLogResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainLog',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainLog(request: DescribeLiveDomainLogRequest): DescribeLiveDomainLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainLogWithOptions(request, runtime);
}

model DescribeLiveDomainMappingRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveDomainMappingResponseBody = {
  liveDomainModels?: {
    liveDomainModel?: [ 
    {
      domainName?: string(name='DomainName'),
      type?: string(name='Type'),
    }
  ](name='LiveDomainModel')
  }(name='LiveDomainModels'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainMappingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainMappingResponseBody(name='body'),
}

async function describeLiveDomainMappingWithOptions(request: DescribeLiveDomainMappingRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainMappingResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainMapping',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainMapping(request: DescribeLiveDomainMappingRequest): DescribeLiveDomainMappingResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainMappingWithOptions(request, runtime);
}

model DescribeLiveDomainOnlineUserNumRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  queryTime?: string(name='QueryTime'),
}

model DescribeLiveDomainOnlineUserNumResponseBody = {
  onlineUserInfo?: {
    liveStreamOnlineUserNumInfo?: [ 
    {
      infos?: {
        info?: [ 
        {
          transcodeTemplate?: string(name='TranscodeTemplate'),
          userNumber?: long(name='UserNumber'),
        }
      ](name='Info')
      }(name='Infos'),
      streamName?: string(name='StreamName'),
    }
  ](name='LiveStreamOnlineUserNumInfo')
  }(name='OnlineUserInfo'),
  requestId?: string(name='RequestId'),
  streamCount?: int32(name='StreamCount'),
  userCount?: int32(name='UserCount'),
}

model DescribeLiveDomainOnlineUserNumResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainOnlineUserNumResponseBody(name='body'),
}

async function describeLiveDomainOnlineUserNumWithOptions(request: DescribeLiveDomainOnlineUserNumRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainOnlineUserNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.queryTime)) {
    query['QueryTime'] = request.queryTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainOnlineUserNum',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainOnlineUserNum(request: DescribeLiveDomainOnlineUserNumRequest): DescribeLiveDomainOnlineUserNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainOnlineUserNumWithOptions(request, runtime);
}

model DescribeLiveDomainPushBpsDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainPushBpsDataResponseBody = {
  bpsDataPerInterval?: {
    dataModule?: [ 
    {
      bpsValue?: string(name='BpsValue'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='DataModule')
  }(name='BpsDataPerInterval'),
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainPushBpsDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainPushBpsDataResponseBody(name='body'),
}

async function describeLiveDomainPushBpsDataWithOptions(request: DescribeLiveDomainPushBpsDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainPushBpsDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainPushBpsData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainPushBpsData(request: DescribeLiveDomainPushBpsDataRequest): DescribeLiveDomainPushBpsDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainPushBpsDataWithOptions(request, runtime);
}

model DescribeLiveDomainPushTrafficDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainPushTrafficDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  trafficDataPerInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      trafficValue?: string(name='TrafficValue'),
    }
  ](name='DataModule')
  }(name='TrafficDataPerInterval'),
}

model DescribeLiveDomainPushTrafficDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainPushTrafficDataResponseBody(name='body'),
}

async function describeLiveDomainPushTrafficDataWithOptions(request: DescribeLiveDomainPushTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainPushTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainPushTrafficData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainPushTrafficData(request: DescribeLiveDomainPushTrafficDataRequest): DescribeLiveDomainPushTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainPushTrafficDataWithOptions(request, runtime);
}

model DescribeLiveDomainPvUvDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainPvUvDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  pvUvDataInfos?: {
    pvUvDataInfo?: [ 
    {
      PV?: string(name='PV'),
      timeStamp?: string(name='TimeStamp'),
      UV?: string(name='UV'),
    }
  ](name='PvUvDataInfo')
  }(name='PvUvDataInfos'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainPvUvDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainPvUvDataResponseBody(name='body'),
}

async function describeLiveDomainPvUvDataWithOptions(request: DescribeLiveDomainPvUvDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainPvUvDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainPvUvData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainPvUvData(request: DescribeLiveDomainPvUvDataRequest): DescribeLiveDomainPvUvDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainPvUvDataWithOptions(request, runtime);
}

model DescribeLiveDomainRealTimeBpsDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeBpsDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  realTimeBpsDataPerInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      value?: string(name='Value'),
    }
  ](name='DataModule')
  }(name='RealTimeBpsDataPerInterval'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeBpsDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRealTimeBpsDataResponseBody(name='body'),
}

async function describeLiveDomainRealTimeBpsDataWithOptions(request: DescribeLiveDomainRealTimeBpsDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRealTimeBpsDataResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRealTimeBpsData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRealTimeBpsData(request: DescribeLiveDomainRealTimeBpsDataRequest): DescribeLiveDomainRealTimeBpsDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRealTimeBpsDataWithOptions(request, runtime);
}

model DescribeLiveDomainRealTimeHttpCodeDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeHttpCodeDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  realTimeHttpCodeData?: {
    usageData?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      value?: {
        realTimeCodeProportionData?: [ 
        {
          code?: string(name='Code'),
          count?: string(name='Count'),
          proportion?: string(name='Proportion'),
        }
      ](name='RealTimeCodeProportionData')
      }(name='Value'),
    }
  ](name='UsageData')
  }(name='RealTimeHttpCodeData'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeHttpCodeDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRealTimeHttpCodeDataResponseBody(name='body'),
}

async function describeLiveDomainRealTimeHttpCodeDataWithOptions(request: DescribeLiveDomainRealTimeHttpCodeDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRealTimeHttpCodeDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRealTimeHttpCodeData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRealTimeHttpCodeData(request: DescribeLiveDomainRealTimeHttpCodeDataRequest): DescribeLiveDomainRealTimeHttpCodeDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRealTimeHttpCodeDataWithOptions(request, runtime);
}

model DescribeLiveDomainRealTimeTrafficDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeTrafficDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  realTimeTrafficDataPerInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      value?: string(name='Value'),
    }
  ](name='DataModule')
  }(name='RealTimeTrafficDataPerInterval'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRealTimeTrafficDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRealTimeTrafficDataResponseBody(name='body'),
}

async function describeLiveDomainRealTimeTrafficDataWithOptions(request: DescribeLiveDomainRealTimeTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRealTimeTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRealTimeTrafficData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRealTimeTrafficData(request: DescribeLiveDomainRealTimeTrafficDataRequest): DescribeLiveDomainRealTimeTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRealTimeTrafficDataWithOptions(request, runtime);
}

model DescribeLiveDomainRealtimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveDomainRealtimeLogDeliveryResponseBody = {
  logstore?: string(name='Logstore'),
  project?: string(name='Project'),
  region?: string(name='Region'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model DescribeLiveDomainRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRealtimeLogDeliveryResponseBody(name='body'),
}

async function describeLiveDomainRealtimeLogDeliveryWithOptions(request: DescribeLiveDomainRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRealtimeLogDelivery(request: DescribeLiveDomainRealtimeLogDeliveryRequest): DescribeLiveDomainRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRealtimeLogDeliveryWithOptions(request, runtime);
}

model DescribeLiveDomainRecordDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  recordType?: string(name='RecordType'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRecordDataResponseBody = {
  recordDataInfos?: {
    recordDataInfo?: [ 
    {
      date?: string(name='Date'),
      detail?: {
        FLV?: int32(name='FLV'),
        MP4?: int32(name='MP4'),
        TS?: int32(name='TS'),
      }(name='Detail'),
      total?: int32(name='Total'),
    }
  ](name='RecordDataInfo')
  }(name='RecordDataInfos'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainRecordDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRecordDataResponseBody(name='body'),
}

async function describeLiveDomainRecordDataWithOptions(request: DescribeLiveDomainRecordDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRecordDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recordType)) {
    query['RecordType'] = request.recordType;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRecordData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRecordData(request: DescribeLiveDomainRecordDataRequest): DescribeLiveDomainRecordDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRecordDataWithOptions(request, runtime);
}

model DescribeLiveDomainRecordUsageDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  splitBy?: string(name='SplitBy'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainRecordUsageDataResponseBody = {
  recordUsageData?: {
    dataModule?: [ 
    {
      count?: long(name='Count'),
      domain?: string(name='Domain'),
      duration?: long(name='Duration'),
      timeStamp?: string(name='TimeStamp'),
      type?: string(name='Type'),
    }
  ](name='DataModule')
  }(name='RecordUsageData'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainRecordUsageDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainRecordUsageDataResponseBody(name='body'),
}

async function describeLiveDomainRecordUsageDataWithOptions(request: DescribeLiveDomainRecordUsageDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainRecordUsageDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.splitBy)) {
    query['SplitBy'] = request.splitBy;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainRecordUsageData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainRecordUsageData(request: DescribeLiveDomainRecordUsageDataRequest): DescribeLiveDomainRecordUsageDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainRecordUsageDataWithOptions(request, runtime);
}

model DescribeLiveDomainSnapshotDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainSnapshotDataResponseBody = {
  requestId?: string(name='RequestId'),
  snapshotDataInfos?: {
    snapshotDataInfo?: [ 
    {
      date?: string(name='Date'),
      total?: int32(name='Total'),
    }
  ](name='SnapshotDataInfo')
  }(name='SnapshotDataInfos'),
}

model DescribeLiveDomainSnapshotDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainSnapshotDataResponseBody(name='body'),
}

async function describeLiveDomainSnapshotDataWithOptions(request: DescribeLiveDomainSnapshotDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainSnapshotDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainSnapshotData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainSnapshotData(request: DescribeLiveDomainSnapshotDataRequest): DescribeLiveDomainSnapshotDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainSnapshotDataWithOptions(request, runtime);
}

model DescribeLiveDomainStagingConfigRequest {
  domainName?: string(name='DomainName'),
  functionNames?: string(name='FunctionNames'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveDomainStagingConfigResponseBody = {
  domainConfigs?: [ 
    {
      configId?: string(name='ConfigId'),
      functionArgs?: [ 
        {
          argName?: string(name='ArgName'),
          argValue?: string(name='ArgValue'),
        }
      ](name='FunctionArgs'),
      functionName?: string(name='FunctionName'),
      status?: string(name='Status'),
    }
  ](name='DomainConfigs'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDomainStagingConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainStagingConfigResponseBody(name='body'),
}

async function describeLiveDomainStagingConfigWithOptions(request: DescribeLiveDomainStagingConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainStagingConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.functionNames)) {
    query['FunctionNames'] = request.functionNames;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainStagingConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainStagingConfig(request: DescribeLiveDomainStagingConfigRequest): DescribeLiveDomainStagingConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainStagingConfigWithOptions(request, runtime);
}

model DescribeLiveDomainStreamTranscodeDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ownerId?: long(name='OwnerId'),
  split?: string(name='Split'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainStreamTranscodeDataResponseBody = {
  requestId?: string(name='RequestId'),
  transcodeDataList?: {
    transcodeData?: [ 
    {
      domain?: string(name='Domain'),
      duration?: int32(name='Duration'),
      fps?: string(name='Fps'),
      region?: string(name='Region'),
      resolution?: string(name='Resolution'),
      tanscodeType?: string(name='TanscodeType'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='TranscodeData')
  }(name='TranscodeDataList'),
}

model DescribeLiveDomainStreamTranscodeDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainStreamTranscodeDataResponseBody(name='body'),
}

async function describeLiveDomainStreamTranscodeDataWithOptions(request: DescribeLiveDomainStreamTranscodeDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainStreamTranscodeDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.split)) {
    query['Split'] = request.split;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainStreamTranscodeData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainStreamTranscodeData(request: DescribeLiveDomainStreamTranscodeDataRequest): DescribeLiveDomainStreamTranscodeDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainStreamTranscodeDataWithOptions(request, runtime);
}

model DescribeLiveDomainTimeShiftDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainTimeShiftDataResponseBody = {
  requestId?: string(name='RequestId'),
  timeShiftData?: {
    dataModule?: [ 
    {
      size?: string(name='Size'),
      timeStamp?: string(name='TimeStamp'),
      type?: string(name='Type'),
    }
  ](name='DataModule')
  }(name='TimeShiftData'),
}

model DescribeLiveDomainTimeShiftDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainTimeShiftDataResponseBody(name='body'),
}

async function describeLiveDomainTimeShiftDataWithOptions(request: DescribeLiveDomainTimeShiftDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainTimeShiftDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainTimeShiftData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainTimeShiftData(request: DescribeLiveDomainTimeShiftDataRequest): DescribeLiveDomainTimeShiftDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainTimeShiftDataWithOptions(request, runtime);
}

model DescribeLiveDomainTrafficDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ispNameEn?: string(name='IspNameEn'),
  locationNameEn?: string(name='LocationNameEn'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainTrafficDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  trafficDataPerInterval?: {
    dataModule?: [ 
    {
      httpTrafficValue?: string(name='HttpTrafficValue'),
      httpsTrafficValue?: string(name='HttpsTrafficValue'),
      timeStamp?: string(name='TimeStamp'),
      trafficValue?: string(name='TrafficValue'),
    }
  ](name='DataModule')
  }(name='TrafficDataPerInterval'),
}

model DescribeLiveDomainTrafficDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainTrafficDataResponseBody(name='body'),
}

async function describeLiveDomainTrafficDataWithOptions(request: DescribeLiveDomainTrafficDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainTrafficDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!Util.isUnset(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainTrafficData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainTrafficData(request: DescribeLiveDomainTrafficDataRequest): DescribeLiveDomainTrafficDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainTrafficDataWithOptions(request, runtime);
}

model DescribeLiveDomainTranscodeDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDomainTranscodeDataResponseBody = {
  requestId?: string(name='RequestId'),
  transcodeDataInfos?: {
    transcodeDataInfo?: [ 
    {
      date?: string(name='Date'),
      detail?: string(name='Detail'),
      total?: int32(name='Total'),
    }
  ](name='TranscodeDataInfo')
  }(name='TranscodeDataInfos'),
}

model DescribeLiveDomainTranscodeDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDomainTranscodeDataResponseBody(name='body'),
}

async function describeLiveDomainTranscodeDataWithOptions(request: DescribeLiveDomainTranscodeDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDomainTranscodeDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDomainTranscodeData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDomainTranscodeData(request: DescribeLiveDomainTranscodeDataRequest): DescribeLiveDomainTranscodeDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDomainTranscodeDataWithOptions(request, runtime);
}

model DescribeLiveDrmUsageDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  ownerId?: long(name='OwnerId'),
  splitBy?: string(name='SplitBy'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveDrmUsageDataResponseBody = {
  drmUsageData?: {
    dataModule?: [ 
    {
      count?: long(name='Count'),
      domain?: string(name='Domain'),
      drmType?: string(name='DrmType'),
      region?: string(name='Region'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='DataModule')
  }(name='DrmUsageData'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveDrmUsageDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveDrmUsageDataResponseBody(name='body'),
}

async function describeLiveDrmUsageDataWithOptions(request: DescribeLiveDrmUsageDataRequest, runtime: Util.RuntimeOptions): DescribeLiveDrmUsageDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.splitBy)) {
    query['SplitBy'] = request.splitBy;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveDrmUsageData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveDrmUsageData(request: DescribeLiveDrmUsageDataRequest): DescribeLiveDrmUsageDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveDrmUsageDataWithOptions(request, runtime);
}

model DescribeLiveEdgeTransferRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveEdgeTransferResponseBody = {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  httpDns?: string(name='HttpDns'),
  requestId?: string(name='RequestId'),
  streamName?: string(name='StreamName'),
  targetDomainList?: string(name='TargetDomainList'),
  transferArgs?: string(name='TransferArgs'),
}

model DescribeLiveEdgeTransferResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveEdgeTransferResponseBody(name='body'),
}

async function describeLiveEdgeTransferWithOptions(request: DescribeLiveEdgeTransferRequest, runtime: Util.RuntimeOptions): DescribeLiveEdgeTransferResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveEdgeTransfer',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveEdgeTransfer(request: DescribeLiveEdgeTransferRequest): DescribeLiveEdgeTransferResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveEdgeTransferWithOptions(request, runtime);
}

model DescribeLiveLazyPullStreamConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveLazyPullStreamConfigResponseBody = {
  liveLazyPullConfigList?: {
    liveLazyPullConfig?: [ 
    {
      appName?: string(name='AppName'),
      domainName?: string(name='DomainName'),
      pullAppName?: string(name='PullAppName'),
      pullDomainName?: string(name='PullDomainName'),
      pullProtocol?: string(name='PullProtocol'),
    }
  ](name='LiveLazyPullConfig')
  }(name='LiveLazyPullConfigList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveLazyPullStreamConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveLazyPullStreamConfigResponseBody(name='body'),
}

async function describeLiveLazyPullStreamConfigWithOptions(request: DescribeLiveLazyPullStreamConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveLazyPullStreamConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveLazyPullStreamConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveLazyPullStreamConfig(request: DescribeLiveLazyPullStreamConfigRequest): DescribeLiveLazyPullStreamConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveLazyPullStreamConfigWithOptions(request, runtime);
}

model DescribeLiveProducerUsageDataRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  instance?: string(name='Instance'),
  interval?: string(name='Interval'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region'),
  splitBy?: string(name='SplitBy'),
  startTime?: string(name='StartTime'),
  type?: string(name='Type'),
  app?: string(name='app'),
}

model DescribeLiveProducerUsageDataResponseBody = {
  billProducerData?: {
    billProducerDataItem?: [ 
    {
      domainName?: string(name='DomainName'),
      instance?: string(name='Instance'),
      outputHdDuration?: long(name='OutputHdDuration'),
      outputLdDuration?: long(name='OutputLdDuration'),
      outputSdDuration?: long(name='OutputSdDuration'),
      region?: string(name='Region'),
      timeStamp?: string(name='TimeStamp'),
      tranHdDuration?: long(name='TranHdDuration'),
      tranLdDuration?: long(name='TranLdDuration'),
      tranSdDuration?: long(name='TranSdDuration'),
      type?: string(name='Type'),
    }
  ](name='BillProducerDataItem')
  }(name='BillProducerData'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveProducerUsageDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveProducerUsageDataResponseBody(name='body'),
}

async function describeLiveProducerUsageDataWithOptions(request: DescribeLiveProducerUsageDataRequest, runtime: Util.RuntimeOptions): DescribeLiveProducerUsageDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.instance)) {
    query['Instance'] = request.instance;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.splitBy)) {
    query['SplitBy'] = request.splitBy;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.app)) {
    query['app'] = request.app;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveProducerUsageData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveProducerUsageData(request: DescribeLiveProducerUsageDataRequest): DescribeLiveProducerUsageDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveProducerUsageDataWithOptions(request, runtime);
}

model DescribeLivePullStreamConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLivePullStreamConfigResponseBody = {
  liveAppRecordList?: {
    liveAppRecord?: [ 
    {
      appName?: string(name='AppName'),
      domainName?: string(name='DomainName'),
      endTime?: string(name='EndTime'),
      sourceUrl?: string(name='SourceUrl'),
      sourceUsing?: string(name='SourceUsing'),
      startTime?: string(name='StartTime'),
      streamName?: string(name='StreamName'),
    }
  ](name='LiveAppRecord')
  }(name='LiveAppRecordList'),
  requestId?: string(name='RequestId'),
}

model DescribeLivePullStreamConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLivePullStreamConfigResponseBody(name='body'),
}

async function describeLivePullStreamConfigWithOptions(request: DescribeLivePullStreamConfigRequest, runtime: Util.RuntimeOptions): DescribeLivePullStreamConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLivePullStreamConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLivePullStreamConfig(request: DescribeLivePullStreamConfigRequest): DescribeLivePullStreamConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLivePullStreamConfigWithOptions(request, runtime);
}

model DescribeLiveRealtimeDeliveryAccRequest {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  logStore?: string(name='LogStore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveRealtimeDeliveryAccResponseBody = {
  realTimeDeliveryAccData?: {
    accData?: [ 
    {
      failedNum?: int32(name='FailedNum'),
      successNum?: int32(name='SuccessNum'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='AccData')
  }(name='RealTimeDeliveryAccData'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveRealtimeDeliveryAccResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveRealtimeDeliveryAccResponseBody(name='body'),
}

async function describeLiveRealtimeDeliveryAccWithOptions(request: DescribeLiveRealtimeDeliveryAccRequest, runtime: Util.RuntimeOptions): DescribeLiveRealtimeDeliveryAccResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.logStore)) {
    query['LogStore'] = request.logStore;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.project)) {
    query['Project'] = request.project;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveRealtimeDeliveryAcc',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveRealtimeDeliveryAcc(request: DescribeLiveRealtimeDeliveryAccRequest): DescribeLiveRealtimeDeliveryAccResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveRealtimeDeliveryAccWithOptions(request, runtime);
}

model DescribeLiveRealtimeLogAuthorizedRequest {
  liveOpenapiReserve?: string(name='LiveOpenapiReserve'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveRealtimeLogAuthorizedResponseBody = {
  authorizedStatus?: string(name='AuthorizedStatus'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveRealtimeLogAuthorizedResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveRealtimeLogAuthorizedResponseBody(name='body'),
}

async function describeLiveRealtimeLogAuthorizedWithOptions(request: DescribeLiveRealtimeLogAuthorizedRequest, runtime: Util.RuntimeOptions): DescribeLiveRealtimeLogAuthorizedResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveRealtimeLogAuthorized',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveRealtimeLogAuthorized(request: DescribeLiveRealtimeLogAuthorizedRequest): DescribeLiveRealtimeLogAuthorizedResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveRealtimeLogAuthorizedWithOptions(request, runtime);
}

model DescribeLiveRecordConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveRecordConfigResponseBody = {
  liveAppRecordList?: {
    liveAppRecord?: [ 
    {
      appName?: string(name='AppName'),
      createTime?: string(name='CreateTime'),
      domainName?: string(name='DomainName'),
      endTime?: string(name='EndTime'),
      onDemond?: int32(name='OnDemond'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      recordFormatList?: {
        recordFormat?: [ 
        {
          cycleDuration?: int32(name='CycleDuration'),
          format?: string(name='Format'),
          ossObjectPrefix?: string(name='OssObjectPrefix'),
          sliceDuration?: int32(name='SliceDuration'),
          sliceOssObjectPrefix?: string(name='SliceOssObjectPrefix'),
        }
      ](name='RecordFormat')
      }(name='RecordFormatList'),
      startTime?: string(name='StartTime'),
      streamName?: string(name='StreamName'),
      transcodeRecordFormatList?: {
        recordFormat?: [ 
        {
          cycleDuration?: int32(name='CycleDuration'),
          format?: string(name='Format'),
          ossObjectPrefix?: string(name='OssObjectPrefix'),
          sliceDuration?: int32(name='SliceDuration'),
          sliceOssObjectPrefix?: string(name='SliceOssObjectPrefix'),
        }
      ](name='RecordFormat')
      }(name='TranscodeRecordFormatList'),
      transcodeTemplates?: {
        templates?: [ string ](name='Templates')
      }(name='TranscodeTemplates'),
    }
  ](name='LiveAppRecord')
  }(name='LiveAppRecordList'),
  order?: string(name='Order'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveRecordConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveRecordConfigResponseBody(name='body'),
}

async function describeLiveRecordConfigWithOptions(request: DescribeLiveRecordConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveRecordConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveRecordConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveRecordConfig(request: DescribeLiveRecordConfigRequest): DescribeLiveRecordConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveRecordConfigWithOptions(request, runtime);
}

model DescribeLiveRecordNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveRecordNotifyConfigResponseBody = {
  liveRecordNotifyConfig?: {
    domainName?: string(name='DomainName'),
    needStatusNotify?: boolean(name='NeedStatusNotify'),
    notifyUrl?: string(name='NotifyUrl'),
    onDemandUrl?: string(name='OnDemandUrl'),
  }(name='LiveRecordNotifyConfig'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveRecordNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveRecordNotifyConfigResponseBody(name='body'),
}

async function describeLiveRecordNotifyConfigWithOptions(request: DescribeLiveRecordNotifyConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveRecordNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveRecordNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveRecordNotifyConfig(request: DescribeLiveRecordNotifyConfigRequest): DescribeLiveRecordNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveRecordNotifyConfigWithOptions(request, runtime);
}

model DescribeLiveRecordVodConfigsRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveRecordVodConfigsResponseBody = {
  liveRecordVodConfigs?: {
    liveRecordVodConfig?: [ 
    {
      appName?: string(name='AppName'),
      autoCompose?: string(name='AutoCompose'),
      composeVodTranscodeGroupId?: string(name='ComposeVodTranscodeGroupId'),
      createTime?: string(name='CreateTime'),
      cycleDuration?: int32(name='CycleDuration'),
      domainName?: string(name='DomainName'),
      streamName?: string(name='StreamName'),
      vodTranscodeGroupId?: string(name='VodTranscodeGroupId'),
    }
  ](name='LiveRecordVodConfig')
  }(name='LiveRecordVodConfigs'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  total?: string(name='Total'),
}

model DescribeLiveRecordVodConfigsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveRecordVodConfigsResponseBody(name='body'),
}

async function describeLiveRecordVodConfigsWithOptions(request: DescribeLiveRecordVodConfigsRequest, runtime: Util.RuntimeOptions): DescribeLiveRecordVodConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveRecordVodConfigs',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveRecordVodConfigs(request: DescribeLiveRecordVodConfigsRequest): DescribeLiveRecordVodConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveRecordVodConfigsWithOptions(request, runtime);
}

model DescribeLiveShiftConfigsRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveShiftConfigsResponseBody = {
  content?: {
    config?: [ 
    {
      appName?: string(name='AppName'),
      domainName?: string(name='DomainName'),
      ignoreTranscode?: boolean(name='IgnoreTranscode'),
      streamName?: string(name='StreamName'),
      vision?: int32(name='Vision'),
    }
  ](name='Config')
  }(name='Content'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveShiftConfigsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveShiftConfigsResponseBody(name='body'),
}

async function describeLiveShiftConfigsWithOptions(request: DescribeLiveShiftConfigsRequest, runtime: Util.RuntimeOptions): DescribeLiveShiftConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveShiftConfigs',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveShiftConfigs(request: DescribeLiveShiftConfigsRequest): DescribeLiveShiftConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveShiftConfigsWithOptions(request, runtime);
}

model DescribeLiveSnapshotConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveSnapshotConfigResponseBody = {
  liveStreamSnapshotConfigList?: {
    liveStreamSnapshotConfig?: [ 
    {
      appName?: string(name='AppName'),
      callback?: string(name='Callback'),
      createTime?: string(name='CreateTime'),
      domainName?: string(name='DomainName'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      overwriteOssObject?: string(name='OverwriteOssObject'),
      sequenceOssObject?: string(name='SequenceOssObject'),
      timeInterval?: int32(name='TimeInterval'),
    }
  ](name='LiveStreamSnapshotConfig')
  }(name='LiveStreamSnapshotConfigList'),
  order?: string(name='Order'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveSnapshotConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveSnapshotConfigResponseBody(name='body'),
}

async function describeLiveSnapshotConfigWithOptions(request: DescribeLiveSnapshotConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveSnapshotConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveSnapshotConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveSnapshotConfig(request: DescribeLiveSnapshotConfigRequest): DescribeLiveSnapshotConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveSnapshotConfigWithOptions(request, runtime);
}

model DescribeLiveSnapshotDetectPornConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveSnapshotDetectPornConfigResponseBody = {
  liveSnapshotDetectPornConfigList?: {
    liveSnapshotDetectPornConfig?: [ 
    {
      appName?: string(name='AppName'),
      domainName?: string(name='DomainName'),
      interval?: int32(name='Interval'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      ossObject?: string(name='OssObject'),
      scenes?: {
        scene?: [ string ](name='scene')
      }(name='Scenes'),
    }
  ](name='LiveSnapshotDetectPornConfig')
  }(name='LiveSnapshotDetectPornConfigList'),
  order?: string(name='Order'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveSnapshotDetectPornConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveSnapshotDetectPornConfigResponseBody(name='body'),
}

async function describeLiveSnapshotDetectPornConfigWithOptions(request: DescribeLiveSnapshotDetectPornConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveSnapshotDetectPornConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveSnapshotDetectPornConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveSnapshotDetectPornConfig(request: DescribeLiveSnapshotDetectPornConfigRequest): DescribeLiveSnapshotDetectPornConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveSnapshotDetectPornConfigWithOptions(request, runtime);
}

model DescribeLiveSnapshotNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveSnapshotNotifyConfigResponseBody = {
  domainName?: string(name='DomainName'),
  notifyAuthKey?: string(name='NotifyAuthKey'),
  notifyReqAuth?: string(name='NotifyReqAuth'),
  notifyUrl?: string(name='NotifyUrl'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveSnapshotNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveSnapshotNotifyConfigResponseBody(name='body'),
}

async function describeLiveSnapshotNotifyConfigWithOptions(request: DescribeLiveSnapshotNotifyConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveSnapshotNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveSnapshotNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveSnapshotNotifyConfig(request: DescribeLiveSnapshotNotifyConfigRequest): DescribeLiveSnapshotNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveSnapshotNotifyConfigWithOptions(request, runtime);
}

model DescribeLiveStreamAuthCheckingRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  url?: string(name='Url'),
}

model DescribeLiveStreamAuthCheckingResponseBody = {
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
  status?: string(name='Status'),
}

model DescribeLiveStreamAuthCheckingResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamAuthCheckingResponseBody(name='body'),
}

async function describeLiveStreamAuthCheckingWithOptions(request: DescribeLiveStreamAuthCheckingRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamAuthCheckingResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.url)) {
    query['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamAuthChecking',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamAuthChecking(request: DescribeLiveStreamAuthCheckingRequest): DescribeLiveStreamAuthCheckingResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamAuthCheckingWithOptions(request, runtime);
}

model DescribeLiveStreamBitRateDataRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamBitRateDataResponseBody = {
  frameRateAndBitRateInfos?: {
    frameRateAndBitRateInfo?: [ 
    {
      audioFrameRate?: float(name='AudioFrameRate'),
      bitRate?: float(name='BitRate'),
      streamUrl?: string(name='StreamUrl'),
      time?: string(name='Time'),
      videoFrameRate?: float(name='VideoFrameRate'),
    }
  ](name='FrameRateAndBitRateInfo')
  }(name='FrameRateAndBitRateInfos'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamBitRateDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamBitRateDataResponseBody(name='body'),
}

async function describeLiveStreamBitRateDataWithOptions(request: DescribeLiveStreamBitRateDataRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamBitRateDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamBitRateData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamBitRateData(request: DescribeLiveStreamBitRateDataRequest): DescribeLiveStreamBitRateDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamBitRateDataWithOptions(request, runtime);
}

model DescribeLiveStreamCountRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamCountResponseBody = {
  requestId?: string(name='RequestId'),
  streamCountInfos?: {
    streamCountInfo?: [ 
    {
      count?: long(name='Count'),
      limit?: long(name='Limit'),
      streamCountDetails?: {
        streamCountDetail?: [ 
        {
          count?: long(name='Count'),
          format?: string(name='Format'),
          videoDataRate?: long(name='VideoDataRate'),
        }
      ](name='StreamCountDetail')
      }(name='StreamCountDetails'),
      type?: string(name='Type'),
    }
  ](name='StreamCountInfo')
  }(name='StreamCountInfos'),
}

model DescribeLiveStreamCountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamCountResponseBody(name='body'),
}

async function describeLiveStreamCountWithOptions(request: DescribeLiveStreamCountRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamCountResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamCount',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamCount(request: DescribeLiveStreamCountRequest): DescribeLiveStreamCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamCountWithOptions(request, runtime);
}

model DescribeLiveStreamDelayConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamDelayConfigResponseBody = {
  liveStreamFlvDelayConfig?: {
    delay?: int32(name='Delay'),
    level?: string(name='Level'),
  }(name='LiveStreamFlvDelayConfig'),
  liveStreamHlsDelayConfig?: {
    delay?: int32(name='Delay'),
    level?: string(name='Level'),
  }(name='LiveStreamHlsDelayConfig'),
  liveStreamRtmpDelayConfig?: {
    delay?: int32(name='Delay'),
    level?: string(name='Level'),
  }(name='LiveStreamRtmpDelayConfig'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamDelayConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamDelayConfigResponseBody(name='body'),
}

async function describeLiveStreamDelayConfigWithOptions(request: DescribeLiveStreamDelayConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamDelayConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamDelayConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamDelayConfig(request: DescribeLiveStreamDelayConfigRequest): DescribeLiveStreamDelayConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamDelayConfigWithOptions(request, runtime);
}

model DescribeLiveStreamHistoryUserNumRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamHistoryUserNumResponseBody = {
  liveStreamUserNumInfos?: {
    liveStreamUserNumInfo?: [ 
    {
      streamTime?: string(name='StreamTime'),
      userNum?: string(name='UserNum'),
    }
  ](name='LiveStreamUserNumInfo')
  }(name='LiveStreamUserNumInfos'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamHistoryUserNumResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamHistoryUserNumResponseBody(name='body'),
}

async function describeLiveStreamHistoryUserNumWithOptions(request: DescribeLiveStreamHistoryUserNumRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamHistoryUserNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamHistoryUserNum',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamHistoryUserNum(request: DescribeLiveStreamHistoryUserNumRequest): DescribeLiveStreamHistoryUserNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamHistoryUserNumWithOptions(request, runtime);
}

model DescribeLiveStreamMetricDetailDataRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  nextPageToken?: string(name='NextPageToken'),
  ownerId?: long(name='OwnerId'),
  protocol?: string(name='Protocol'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamMetricDetailDataResponseBody = {
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  nextPageToken?: string(name='NextPageToken'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  streamDetailData?: {
    streamData?: [ 
    {
      appName?: string(name='AppName'),
      bps?: float(name='Bps'),
      count?: long(name='Count'),
      flvBps?: float(name='FlvBps'),
      flvCount?: long(name='FlvCount'),
      flvTraffic?: long(name='FlvTraffic'),
      hlsBps?: float(name='HlsBps'),
      hlsCount?: long(name='HlsCount'),
      hlsTraffic?: long(name='HlsTraffic'),
      p2pBps?: float(name='P2pBps'),
      p2pCount?: long(name='P2pCount'),
      p2pTraffic?: long(name='P2pTraffic'),
      rtmpBps?: float(name='RtmpBps'),
      rtmpCount?: long(name='RtmpCount'),
      rtmpTraffic?: long(name='RtmpTraffic'),
      rtsBps?: float(name='RtsBps'),
      rtsCount?: long(name='RtsCount'),
      rtsTraffic?: long(name='RtsTraffic'),
      streamName?: string(name='StreamName'),
      timeStamp?: string(name='TimeStamp'),
      traffic?: long(name='Traffic'),
    }
  ](name='StreamData')
  }(name='StreamDetailData'),
}

model DescribeLiveStreamMetricDetailDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamMetricDetailDataResponseBody(name='body'),
}

async function describeLiveStreamMetricDetailDataWithOptions(request: DescribeLiveStreamMetricDetailDataRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamMetricDetailDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.nextPageToken)) {
    query['NextPageToken'] = request.nextPageToken;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.protocol)) {
    query['Protocol'] = request.protocol;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamMetricDetailData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamMetricDetailData(request: DescribeLiveStreamMetricDetailDataRequest): DescribeLiveStreamMetricDetailDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamMetricDetailDataWithOptions(request, runtime);
}

model DescribeLiveStreamMonitorListRequest {
  monitorId?: string(name='MonitorId'),
  orderRule?: int32(name='OrderRule'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  status?: int32(name='Status'),
}

model DescribeLiveStreamMonitorListResponseBody = {
  liveStreamMonitorList?: [ 
    {
      audioFrom?: int32(name='AudioFrom'),
      domain?: string(name='Domain'),
      inputList?: [ 
        {
          index?: int32(name='Index'),
          inputUrl?: string(name='InputUrl'),
          layoutConfig?: {
            fillMode?: string(name='FillMode'),
            positionNormalized?: [ float ](name='PositionNormalized'),
            positionRefer?: string(name='PositionRefer'),
            sizeNormalized?: [ float ](name='SizeNormalized'),
          }(name='LayoutConfig'),
          layoutId?: int32(name='LayoutId'),
          playConfig?: {
            volumeRate?: float(name='VolumeRate'),
          }(name='PlayConfig'),
          streamName?: string(name='StreamName'),
        }
      ](name='InputList'),
      monitorId?: string(name='MonitorId'),
      monitorName?: string(name='MonitorName'),
      outputTemplate?: string(name='OutputTemplate'),
      outputUrls?: {
        flvUrl?: string(name='FlvUrl'),
        rtmpUrl?: string(name='RtmpUrl'),
      }(name='OutputUrls'),
      region?: string(name='Region'),
      startTime?: string(name='StartTime'),
      status?: int32(name='Status'),
      stopTime?: string(name='StopTime'),
    }
  ](name='LiveStreamMonitorList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeLiveStreamMonitorListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamMonitorListResponseBody(name='body'),
}

async function describeLiveStreamMonitorListWithOptions(request: DescribeLiveStreamMonitorListRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamMonitorListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.monitorId)) {
    query['MonitorId'] = request.monitorId;
  }
  if (!Util.isUnset(request.orderRule)) {
    query['OrderRule'] = request.orderRule;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamMonitorList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamMonitorList(request: DescribeLiveStreamMonitorListRequest): DescribeLiveStreamMonitorListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamMonitorListWithOptions(request, runtime);
}

model DescribeLiveStreamOptimizedFeatureConfigRequest {
  configName?: string(name='ConfigName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamOptimizedFeatureConfigResponseBody = {
  liveStreamOptimizedFeatureConfigList?: {
    liveStreamOptimizedFeatureConfig?: [ 
    {
      configName?: string(name='ConfigName'),
      configStatus?: string(name='ConfigStatus'),
      configValue?: string(name='ConfigValue'),
      domainName?: string(name='DomainName'),
    }
  ](name='LiveStreamOptimizedFeatureConfig')
  }(name='LiveStreamOptimizedFeatureConfigList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamOptimizedFeatureConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamOptimizedFeatureConfigResponseBody(name='body'),
}

async function describeLiveStreamOptimizedFeatureConfigWithOptions(request: DescribeLiveStreamOptimizedFeatureConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamOptimizedFeatureConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamOptimizedFeatureConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamOptimizedFeatureConfig(request: DescribeLiveStreamOptimizedFeatureConfigRequest): DescribeLiveStreamOptimizedFeatureConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamOptimizedFeatureConfigWithOptions(request, runtime);
}

model DescribeLiveStreamRecordContentRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamRecordContentResponseBody = {
  recordContentInfoList?: {
    recordContentInfo?: [ 
    {
      duration?: float(name='Duration'),
      endTime?: string(name='EndTime'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      ossObjectPrefix?: string(name='OssObjectPrefix'),
      startTime?: string(name='StartTime'),
    }
  ](name='RecordContentInfo')
  }(name='RecordContentInfoList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamRecordContentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamRecordContentResponseBody(name='body'),
}

async function describeLiveStreamRecordContentWithOptions(request: DescribeLiveStreamRecordContentRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamRecordContentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamRecordContent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamRecordContent(request: DescribeLiveStreamRecordContentRequest): DescribeLiveStreamRecordContentResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamRecordContentWithOptions(request, runtime);
}

model DescribeLiveStreamRecordIndexFileRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  recordId?: string(name='RecordId'),
  securityToken?: string(name='SecurityToken'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamRecordIndexFileResponseBody = {
  recordIndexInfo?: {
    appName?: string(name='AppName'),
    createTime?: string(name='CreateTime'),
    domainName?: string(name='DomainName'),
    duration?: float(name='Duration'),
    endTime?: string(name='EndTime'),
    height?: int32(name='Height'),
    ossBucket?: string(name='OssBucket'),
    ossEndpoint?: string(name='OssEndpoint'),
    ossObject?: string(name='OssObject'),
    recordId?: string(name='RecordId'),
    recordUrl?: string(name='RecordUrl'),
    startTime?: string(name='StartTime'),
    streamName?: string(name='StreamName'),
    width?: int32(name='Width'),
  }(name='RecordIndexInfo'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamRecordIndexFileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamRecordIndexFileResponseBody(name='body'),
}

async function describeLiveStreamRecordIndexFileWithOptions(request: DescribeLiveStreamRecordIndexFileRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamRecordIndexFileResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.recordId)) {
    query['RecordId'] = request.recordId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamRecordIndexFile',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamRecordIndexFile(request: DescribeLiveStreamRecordIndexFileRequest): DescribeLiveStreamRecordIndexFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamRecordIndexFileWithOptions(request, runtime);
}

model DescribeLiveStreamRecordIndexFilesRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamRecordIndexFilesResponseBody = {
  order?: string(name='Order'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  recordIndexInfoList?: {
    recordIndexInfo?: [ 
    {
      appName?: string(name='AppName'),
      createTime?: string(name='CreateTime'),
      domainName?: string(name='DomainName'),
      duration?: float(name='Duration'),
      endTime?: string(name='EndTime'),
      height?: int32(name='Height'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      ossObject?: string(name='OssObject'),
      recordId?: string(name='RecordId'),
      recordUrl?: string(name='RecordUrl'),
      startTime?: string(name='StartTime'),
      streamName?: string(name='StreamName'),
      width?: int32(name='Width'),
    }
  ](name='RecordIndexInfo')
  }(name='RecordIndexInfoList'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveStreamRecordIndexFilesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamRecordIndexFilesResponseBody(name='body'),
}

async function describeLiveStreamRecordIndexFilesWithOptions(request: DescribeLiveStreamRecordIndexFilesRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamRecordIndexFilesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamRecordIndexFiles',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamRecordIndexFiles(request: DescribeLiveStreamRecordIndexFilesRequest): DescribeLiveStreamRecordIndexFilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamRecordIndexFilesWithOptions(request, runtime);
}

model DescribeLiveStreamSnapshotInfoRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  limit?: int32(name='Limit'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamSnapshotInfoResponseBody = {
  liveStreamSnapshotInfoList?: {
    liveStreamSnapshotInfo?: [ 
    {
      createTime?: string(name='CreateTime'),
      createTimestamp?: long(name='CreateTimestamp'),
      isOverlay?: boolean(name='IsOverlay'),
      ossBucket?: string(name='OssBucket'),
      ossEndpoint?: string(name='OssEndpoint'),
      ossObject?: string(name='OssObject'),
    }
  ](name='LiveStreamSnapshotInfo')
  }(name='LiveStreamSnapshotInfoList'),
  nextStartTime?: string(name='NextStartTime'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamSnapshotInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamSnapshotInfoResponseBody(name='body'),
}

async function describeLiveStreamSnapshotInfoWithOptions(request: DescribeLiveStreamSnapshotInfoRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamSnapshotInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.limit)) {
    query['Limit'] = request.limit;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamSnapshotInfo',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamSnapshotInfo(request: DescribeLiveStreamSnapshotInfoRequest): DescribeLiveStreamSnapshotInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamSnapshotInfoWithOptions(request, runtime);
}

model DescribeLiveStreamStateRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamStateResponseBody = {
  requestId?: string(name='RequestId'),
  streamState?: string(name='StreamState'),
  type?: string(name='Type'),
}

model DescribeLiveStreamStateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamStateResponseBody(name='body'),
}

async function describeLiveStreamStateWithOptions(request: DescribeLiveStreamStateRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamStateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamState',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamState(request: DescribeLiveStreamStateRequest): DescribeLiveStreamStateResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamStateWithOptions(request, runtime);
}

model DescribeLiveStreamTranscodeInfoRequest {
  domainTranscodeName?: string(name='DomainTranscodeName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamTranscodeInfoResponseBody = {
  domainTranscodeList?: {
    domainTranscodeInfo?: [ 
    {
      customTranscodeParameters?: {
        audioBitrate?: int32(name='AudioBitrate'),
        audioChannelNum?: int32(name='AudioChannelNum'),
        audioCodec?: string(name='AudioCodec'),
        audioProfile?: string(name='AudioProfile'),
        audioRate?: int32(name='AudioRate'),
        bframes?: string(name='Bframes'),
        FPS?: int32(name='FPS'),
        gop?: string(name='Gop'),
        height?: int32(name='Height'),
        rtsFlag?: string(name='RtsFlag'),
        templateType?: string(name='TemplateType'),
        videoBitrate?: int32(name='VideoBitrate'),
        videoProfile?: string(name='VideoProfile'),
        width?: int32(name='Width'),
      }(name='CustomTranscodeParameters'),
      encryptParameters?: {
        encryptType?: string(name='EncryptType'),
        kmsKeyExpireInterval?: string(name='KmsKeyExpireInterval'),
        kmsKeyID?: string(name='KmsKeyID'),
      }(name='EncryptParameters'),
      isLazy?: boolean(name='IsLazy'),
      transcodeApp?: string(name='TranscodeApp'),
      transcodeName?: string(name='TranscodeName'),
      transcodeTemplate?: string(name='TranscodeTemplate'),
    }
  ](name='DomainTranscodeInfo')
  }(name='DomainTranscodeList'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamTranscodeInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamTranscodeInfoResponseBody(name='body'),
}

async function describeLiveStreamTranscodeInfoWithOptions(request: DescribeLiveStreamTranscodeInfoRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamTranscodeInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainTranscodeName)) {
    query['DomainTranscodeName'] = request.domainTranscodeName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamTranscodeInfo',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamTranscodeInfo(request: DescribeLiveStreamTranscodeInfoRequest): DescribeLiveStreamTranscodeInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamTranscodeInfoWithOptions(request, runtime);
}

model DescribeLiveStreamTranscodeStreamNumRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamTranscodeStreamNumResponseBody = {
  lazyTranscodedNumber?: long(name='LazyTranscodedNumber'),
  requestId?: string(name='RequestId'),
  total?: long(name='Total'),
  transcodedNumber?: long(name='TranscodedNumber'),
  untranscodeNumber?: long(name='UntranscodeNumber'),
}

model DescribeLiveStreamTranscodeStreamNumResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamTranscodeStreamNumResponseBody(name='body'),
}

async function describeLiveStreamTranscodeStreamNumWithOptions(request: DescribeLiveStreamTranscodeStreamNumRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamTranscodeStreamNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamTranscodeStreamNum',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamTranscodeStreamNum(request: DescribeLiveStreamTranscodeStreamNumRequest): DescribeLiveStreamTranscodeStreamNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamTranscodeStreamNumWithOptions(request, runtime);
}

model DescribeLiveStreamWatermarkRulesRequest {
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model DescribeLiveStreamWatermarkRulesResponseBody = {
  requestId?: string(name='RequestId'),
  ruleInfoList?: {
    ruleInfo?: [ 
    {
      app?: string(name='App'),
      description?: string(name='Description'),
      domain?: string(name='Domain'),
      name?: string(name='Name'),
      ruleId?: string(name='RuleId'),
      stream?: string(name='Stream'),
      templateId?: string(name='TemplateId'),
    }
  ](name='RuleInfo')
  }(name='RuleInfoList'),
}

model DescribeLiveStreamWatermarkRulesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamWatermarkRulesResponseBody(name='body'),
}

async function describeLiveStreamWatermarkRulesWithOptions(request: DescribeLiveStreamWatermarkRulesRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamWatermarkRulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamWatermarkRules',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamWatermarkRules(request: DescribeLiveStreamWatermarkRulesRequest): DescribeLiveStreamWatermarkRulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamWatermarkRulesWithOptions(request, runtime);
}

model DescribeLiveStreamWatermarksRequest {
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model DescribeLiveStreamWatermarksResponseBody = {
  requestId?: string(name='RequestId'),
  watermarkList?: {
    watermark?: [ 
    {
      description?: string(name='Description'),
      height?: int32(name='Height'),
      name?: string(name='Name'),
      offsetCorner?: string(name='OffsetCorner'),
      pictureUrl?: string(name='PictureUrl'),
      refHeight?: int32(name='RefHeight'),
      refWidth?: int32(name='RefWidth'),
      templateId?: string(name='TemplateId'),
      transparency?: int32(name='Transparency'),
      type?: int32(name='Type'),
      XOffset?: float(name='XOffset'),
      YOffset?: float(name='YOffset'),
    }
  ](name='Watermark')
  }(name='WatermarkList'),
}

model DescribeLiveStreamWatermarksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamWatermarksResponseBody(name='body'),
}

async function describeLiveStreamWatermarksWithOptions(request: DescribeLiveStreamWatermarksRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamWatermarksResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamWatermarks',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamWatermarks(request: DescribeLiveStreamWatermarksRequest): DescribeLiveStreamWatermarksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamWatermarksWithOptions(request, runtime);
}

model DescribeLiveStreamsBlockListRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeLiveStreamsBlockListResponseBody = {
  domainName?: string(name='DomainName'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  streamUrls?: {
    streamUrl?: [ string ](name='StreamUrl')
  }(name='StreamUrls'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveStreamsBlockListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsBlockListResponseBody(name='body'),
}

async function describeLiveStreamsBlockListWithOptions(request: DescribeLiveStreamsBlockListRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsBlockListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsBlockList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsBlockList(request: DescribeLiveStreamsBlockListRequest): DescribeLiveStreamsBlockListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsBlockListWithOptions(request, runtime);
}

model DescribeLiveStreamsControlHistoryRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveStreamsControlHistoryResponseBody = {
  controlInfo?: {
    liveStreamControlInfo?: [ 
    {
      action?: string(name='Action'),
      clientIP?: string(name='ClientIP'),
      streamName?: string(name='StreamName'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='LiveStreamControlInfo')
  }(name='ControlInfo'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamsControlHistoryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsControlHistoryResponseBody(name='body'),
}

async function describeLiveStreamsControlHistoryWithOptions(request: DescribeLiveStreamsControlHistoryRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsControlHistoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsControlHistory',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsControlHistory(request: DescribeLiveStreamsControlHistoryRequest): DescribeLiveStreamsControlHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsControlHistoryWithOptions(request, runtime);
}

model DescribeLiveStreamsNotifyRecordsRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime'),
  status?: string(name='Status'),
  streamName?: string(name='StreamName'),
}

model DescribeLiveStreamsNotifyRecordsResponseBody = {
  notifyRecordsInfo?: {
    liveStreamNotifyRecordsInfo?: [ 
    {
      appName?: string(name='AppName'),
      description?: string(name='Description'),
      domainName?: string(name='DomainName'),
      notifyContent?: string(name='NotifyContent'),
      notifyResult?: string(name='NotifyResult'),
      notifyTime?: string(name='NotifyTime'),
      notifyType?: string(name='NotifyType'),
      notifyUrl?: string(name='NotifyUrl'),
      streamName?: string(name='StreamName'),
    }
  ](name='LiveStreamNotifyRecordsInfo')
  }(name='NotifyRecordsInfo'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveStreamsNotifyRecordsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsNotifyRecordsResponseBody(name='body'),
}

async function describeLiveStreamsNotifyRecordsWithOptions(request: DescribeLiveStreamsNotifyRecordsRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsNotifyRecordsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsNotifyRecords',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsNotifyRecords(request: DescribeLiveStreamsNotifyRecordsRequest): DescribeLiveStreamsNotifyRecordsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsNotifyRecordsWithOptions(request, runtime);
}

model DescribeLiveStreamsNotifyUrlConfigRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveStreamsNotifyUrlConfigResponseBody = {
  liveStreamsNotifyConfig?: {
    domainName?: string(name='DomainName'),
    notifyAuthKey?: string(name='NotifyAuthKey'),
    notifyReqAuth?: string(name='NotifyReqAuth'),
    notifyUrl?: string(name='NotifyUrl'),
  }(name='LiveStreamsNotifyConfig'),
  requestId?: string(name='RequestId'),
}

model DescribeLiveStreamsNotifyUrlConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsNotifyUrlConfigResponseBody(name='body'),
}

async function describeLiveStreamsNotifyUrlConfigWithOptions(request: DescribeLiveStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsNotifyUrlConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsNotifyUrlConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsNotifyUrlConfig(request: DescribeLiveStreamsNotifyUrlConfigRequest): DescribeLiveStreamsNotifyUrlConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model DescribeLiveStreamsOnlineListRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  onlyStream?: string(name='OnlyStream'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  queryType?: string(name='QueryType'),
  streamName?: string(name='StreamName'),
  streamType?: string(name='StreamType'),
}

model DescribeLiveStreamsOnlineListResponseBody = {
  onlineInfo?: {
    liveStreamOnlineInfo?: [ 
    {
      appName?: string(name='AppName'),
      audioCodecId?: int32(name='AudioCodecId'),
      clientIp?: string(name='ClientIp'),
      domainName?: string(name='DomainName'),
      frameRate?: int32(name='FrameRate'),
      height?: int32(name='Height'),
      publishDomain?: string(name='PublishDomain'),
      publishTime?: string(name='PublishTime'),
      publishType?: string(name='PublishType'),
      publishUrl?: string(name='PublishUrl'),
      serverIp?: string(name='ServerIp'),
      streamName?: string(name='StreamName'),
      transcoded?: string(name='Transcoded'),
      videoCodecId?: int32(name='VideoCodecId'),
      width?: int32(name='Width'),
    }
  ](name='LiveStreamOnlineInfo')
  }(name='OnlineInfo'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveStreamsOnlineListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsOnlineListResponseBody(name='body'),
}

async function describeLiveStreamsOnlineListWithOptions(request: DescribeLiveStreamsOnlineListRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsOnlineListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.onlyStream)) {
    query['OnlyStream'] = request.onlyStream;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsOnlineList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsOnlineList(request: DescribeLiveStreamsOnlineListRequest): DescribeLiveStreamsOnlineListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsOnlineListWithOptions(request, runtime);
}

model DescribeLiveStreamsPublishListRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  orderBy?: string(name='OrderBy'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  queryType?: string(name='QueryType'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
  streamType?: string(name='StreamType'),
}

model DescribeLiveStreamsPublishListResponseBody = {
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  publishInfo?: {
    liveStreamPublishInfo?: [ 
    {
      appName?: string(name='AppName'),
      clientAddr?: string(name='ClientAddr'),
      domainName?: string(name='DomainName'),
      edgeNodeAddr?: string(name='EdgeNodeAddr'),
      publishDomain?: string(name='PublishDomain'),
      publishTime?: string(name='PublishTime'),
      publishType?: string(name='PublishType'),
      publishUrl?: string(name='PublishUrl'),
      stopTime?: string(name='StopTime'),
      streamName?: string(name='StreamName'),
      streamUrl?: string(name='StreamUrl'),
      transcodeId?: string(name='TranscodeId'),
      transcoded?: string(name='Transcoded'),
    }
  ](name='LiveStreamPublishInfo')
  }(name='PublishInfo'),
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeLiveStreamsPublishListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveStreamsPublishListResponseBody(name='body'),
}

async function describeLiveStreamsPublishListWithOptions(request: DescribeLiveStreamsPublishListRequest, runtime: Util.RuntimeOptions): DescribeLiveStreamsPublishListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveStreamsPublishList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveStreamsPublishList(request: DescribeLiveStreamsPublishListRequest): DescribeLiveStreamsPublishListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveStreamsPublishListWithOptions(request, runtime);
}

model DescribeLiveTagResourcesRequest {
  ownerId?: long(name='OwnerId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceType?: string(name='ResourceType'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model DescribeLiveTagResourcesResponseBody = {
  requestId?: string(name='RequestId'),
  tagResources?: [ 
    {
      resourceId?: string(name='ResourceId'),
      tag?: [ 
        {
          key?: string(name='Key'),
          value?: string(name='Value'),
        }
      ](name='Tag'),
    }
  ](name='TagResources'),
}

model DescribeLiveTagResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveTagResourcesResponseBody(name='body'),
}

async function describeLiveTagResourcesWithOptions(request: DescribeLiveTagResourcesRequest, runtime: Util.RuntimeOptions): DescribeLiveTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveTagResources',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveTagResources(request: DescribeLiveTagResourcesRequest): DescribeLiveTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveTagResourcesWithOptions(request, runtime);
}

model DescribeLiveTopDomainsByFlowRequest {
  endTime?: string(name='EndTime'),
  limit?: long(name='Limit'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveTopDomainsByFlowResponseBody = {
  domainCount?: long(name='DomainCount'),
  domainOnlineCount?: long(name='DomainOnlineCount'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  topDomains?: {
    topDomain?: [ 
    {
      domainName?: string(name='DomainName'),
      maxBps?: long(name='MaxBps'),
      maxBpsTime?: string(name='MaxBpsTime'),
      rank?: long(name='Rank'),
      totalAccess?: long(name='TotalAccess'),
      totalTraffic?: string(name='TotalTraffic'),
      trafficPercent?: string(name='TrafficPercent'),
    }
  ](name='TopDomain')
  }(name='TopDomains'),
}

model DescribeLiveTopDomainsByFlowResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveTopDomainsByFlowResponseBody(name='body'),
}

async function describeLiveTopDomainsByFlowWithOptions(request: DescribeLiveTopDomainsByFlowRequest, runtime: Util.RuntimeOptions): DescribeLiveTopDomainsByFlowResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.limit)) {
    query['Limit'] = request.limit;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveTopDomainsByFlow',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveTopDomainsByFlow(request: DescribeLiveTopDomainsByFlowRequest): DescribeLiveTopDomainsByFlowResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveTopDomainsByFlowWithOptions(request, runtime);
}

model DescribeLiveUserBillPredictionRequest {
  area?: string(name='Area'),
  dimension?: string(name='Dimension'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveUserBillPredictionResponseBody = {
  billPredictionData?: {
    billPredictionDataItem?: [ 
    {
      area?: string(name='Area'),
      timeStp?: string(name='TimeStp'),
      value?: float(name='Value'),
    }
  ](name='BillPredictionDataItem')
  }(name='BillPredictionData'),
  billType?: string(name='BillType'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeLiveUserBillPredictionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveUserBillPredictionResponseBody(name='body'),
}

async function describeLiveUserBillPredictionWithOptions(request: DescribeLiveUserBillPredictionRequest, runtime: Util.RuntimeOptions): DescribeLiveUserBillPredictionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.area)) {
    query['Area'] = request.area;
  }
  if (!Util.isUnset(request.dimension)) {
    query['Dimension'] = request.dimension;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveUserBillPrediction',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveUserBillPrediction(request: DescribeLiveUserBillPredictionRequest): DescribeLiveUserBillPredictionResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveUserBillPredictionWithOptions(request, runtime);
}

model DescribeLiveUserDomainsRequest {
  domainName?: string(name='DomainName'),
  domainSearchType?: string(name='DomainSearchType'),
  domainStatus?: string(name='DomainStatus'),
  liveDomainType?: string(name='LiveDomainType'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  regionName?: string(name='RegionName'),
  securityToken?: string(name='SecurityToken'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model DescribeLiveUserDomainsResponseBody = {
  domains?: {
    pageData?: [ 
    {
      cname?: string(name='Cname'),
      description?: string(name='Description'),
      domainName?: string(name='DomainName'),
      gmtCreated?: string(name='GmtCreated'),
      gmtModified?: string(name='GmtModified'),
      liveDomainStatus?: string(name='LiveDomainStatus'),
      liveDomainType?: string(name='LiveDomainType'),
      regionName?: string(name='RegionName'),
    }
  ](name='PageData')
  }(name='Domains'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model DescribeLiveUserDomainsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveUserDomainsResponseBody(name='body'),
}

async function describeLiveUserDomainsWithOptions(request: DescribeLiveUserDomainsRequest, runtime: Util.RuntimeOptions): DescribeLiveUserDomainsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.domainSearchType)) {
    query['DomainSearchType'] = request.domainSearchType;
  }
  if (!Util.isUnset(request.domainStatus)) {
    query['DomainStatus'] = request.domainStatus;
  }
  if (!Util.isUnset(request.liveDomainType)) {
    query['LiveDomainType'] = request.liveDomainType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionName)) {
    query['RegionName'] = request.regionName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveUserDomains',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveUserDomains(request: DescribeLiveUserDomainsRequest): DescribeLiveUserDomainsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveUserDomainsWithOptions(request, runtime);
}

model DescribeLiveUserTagsRequest {
  ownerId?: long(name='OwnerId'),
}

model DescribeLiveUserTagsResponseBody = {
  requestId?: string(name='RequestId'),
  tags?: [ 
    {
      key?: string(name='Key'),
      value?: [ string ](name='Value'),
    }
  ](name='Tags'),
}

model DescribeLiveUserTagsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeLiveUserTagsResponseBody(name='body'),
}

async function describeLiveUserTagsWithOptions(request: DescribeLiveUserTagsRequest, runtime: Util.RuntimeOptions): DescribeLiveUserTagsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeLiveUserTags',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeLiveUserTags(request: DescribeLiveUserTagsRequest): DescribeLiveUserTagsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeLiveUserTagsWithOptions(request, runtime);
}

model DescribeMeterLiveRtcDurationRequest {
  endTime?: string(name='EndTime'),
  interval?: string(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTime?: string(name='StartTime'),
  appId?: string(name='appId'),
}

model DescribeMeterLiveRtcDurationResponseBody = {
  audioSummaryDuration?: long(name='AudioSummaryDuration'),
  data?: [ 
    {
      audioDuration?: long(name='AudioDuration'),
      timestamp?: string(name='Timestamp'),
      totalDuration?: long(name='TotalDuration'),
      v1080Duration?: long(name='V1080Duration'),
      v480Duration?: long(name='V480Duration'),
      v720Duration?: long(name='V720Duration'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
  totalSummaryDuration?: long(name='TotalSummaryDuration'),
  v1080SummaryDuration?: long(name='V1080SummaryDuration'),
  v480SummaryDuration?: long(name='V480SummaryDuration'),
  v720SummaryDuration?: long(name='V720SummaryDuration'),
}

model DescribeMeterLiveRtcDurationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMeterLiveRtcDurationResponseBody(name='body'),
}

async function describeMeterLiveRtcDurationWithOptions(request: DescribeMeterLiveRtcDurationRequest, runtime: Util.RuntimeOptions): DescribeMeterLiveRtcDurationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.appId)) {
    query['appId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterLiveRtcDuration',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterLiveRtcDuration(request: DescribeMeterLiveRtcDurationRequest): DescribeMeterLiveRtcDurationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterLiveRtcDurationWithOptions(request, runtime);
}

model DescribeMixStreamListRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  mixStreamId?: string(name='MixStreamId'),
  ownerId?: long(name='OwnerId'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model DescribeMixStreamListResponseBody = {
  mixStreamList?: [ 
    {
      appName?: string(name='AppName'),
      domainName?: string(name='DomainName'),
      gmtCreate?: string(name='GmtCreate'),
      gmtModified?: string(name='GmtModified'),
      inputStreamNumber?: int32(name='InputStreamNumber'),
      layoutId?: string(name='LayoutId'),
      mixStreamTemplate?: string(name='MixStreamTemplate'),
      mixstreamId?: string(name='MixstreamId'),
      streamName?: string(name='StreamName'),
    }
  ](name='MixStreamList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model DescribeMixStreamListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMixStreamListResponseBody(name='body'),
}

async function describeMixStreamListWithOptions(request: DescribeMixStreamListRequest, runtime: Util.RuntimeOptions): DescribeMixStreamListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mixStreamId)) {
    query['MixStreamId'] = request.mixStreamId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNo)) {
    query['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMixStreamList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMixStreamList(request: DescribeMixStreamListRequest): DescribeMixStreamListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMixStreamListWithOptions(request, runtime);
}

model DescribeRTSNativeSDKFirstFrameCostRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameList?: [ string ](name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameCostShrinkRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameListShrink?: string(name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameCostResponseBody = {
  dataInterval?: string(name='DataInterval'),
  endTime?: string(name='EndTime'),
  firstFrameCostData?: [ 
    {
      connected?: string(name='Connected'),
      finishGetStreamInfo?: string(name='FinishGetStreamInfo'),
      firstFrameComplete?: string(name='FirstFrameComplete'),
      firstPacket?: string(name='FirstPacket'),
      initialized?: string(name='Initialized'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='FirstFrameCostData'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameCostResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRTSNativeSDKFirstFrameCostResponseBody(name='body'),
}

async function describeRTSNativeSDKFirstFrameCostWithOptions(tmpReq: DescribeRTSNativeSDKFirstFrameCostRequest, runtime: Util.RuntimeOptions): DescribeRTSNativeSDKFirstFrameCostResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeRTSNativeSDKFirstFrameCostShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.domainNameList)) {
    request.domainNameListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.domainNameList, 'DomainNameList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataInterval)) {
    query['DataInterval'] = request.dataInterval;
  }
  if (!Util.isUnset(request.domainNameListShrink)) {
    query['DomainNameList'] = request.domainNameListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRTSNativeSDKFirstFrameCost',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRTSNativeSDKFirstFrameCost(request: DescribeRTSNativeSDKFirstFrameCostRequest): DescribeRTSNativeSDKFirstFrameCostResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRTSNativeSDKFirstFrameCostWithOptions(request, runtime);
}

model DescribeRTSNativeSDKFirstFrameDelayRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameList?: [ string ](name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameDelayShrinkRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameListShrink?: string(name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameDelayResponseBody = {
  dataInterval?: string(name='DataInterval'),
  endTime?: string(name='EndTime'),
  frameDelayData?: [ 
    {
      frameDelay?: string(name='FrameDelay'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='FrameDelayData'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKFirstFrameDelayResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRTSNativeSDKFirstFrameDelayResponseBody(name='body'),
}

async function describeRTSNativeSDKFirstFrameDelayWithOptions(tmpReq: DescribeRTSNativeSDKFirstFrameDelayRequest, runtime: Util.RuntimeOptions): DescribeRTSNativeSDKFirstFrameDelayResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeRTSNativeSDKFirstFrameDelayShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.domainNameList)) {
    request.domainNameListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.domainNameList, 'DomainNameList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataInterval)) {
    query['DataInterval'] = request.dataInterval;
  }
  if (!Util.isUnset(request.domainNameListShrink)) {
    query['DomainNameList'] = request.domainNameListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRTSNativeSDKFirstFrameDelay',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRTSNativeSDKFirstFrameDelay(request: DescribeRTSNativeSDKFirstFrameDelayRequest): DescribeRTSNativeSDKFirstFrameDelayResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRTSNativeSDKFirstFrameDelayWithOptions(request, runtime);
}

model DescribeRTSNativeSDKPlayFailStatusRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameList?: [ string ](name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayFailStatusShrinkRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameListShrink?: string(name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayFailStatusResponseBody = {
  dataInterval?: string(name='DataInterval'),
  endTime?: string(name='EndTime'),
  playFailStatus?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      v20001?: string(name='V20001'),
      v20002?: string(name='V20002'),
      v20011?: string(name='V20011'),
      v20012?: string(name='V20012'),
      v20013?: string(name='V20013'),
      v20052?: string(name='V20052'),
    }
  ](name='PlayFailStatus'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayFailStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRTSNativeSDKPlayFailStatusResponseBody(name='body'),
}

async function describeRTSNativeSDKPlayFailStatusWithOptions(tmpReq: DescribeRTSNativeSDKPlayFailStatusRequest, runtime: Util.RuntimeOptions): DescribeRTSNativeSDKPlayFailStatusResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeRTSNativeSDKPlayFailStatusShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.domainNameList)) {
    request.domainNameListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.domainNameList, 'DomainNameList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataInterval)) {
    query['DataInterval'] = request.dataInterval;
  }
  if (!Util.isUnset(request.domainNameListShrink)) {
    query['DomainNameList'] = request.domainNameListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRTSNativeSDKPlayFailStatus',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRTSNativeSDKPlayFailStatus(request: DescribeRTSNativeSDKPlayFailStatusRequest): DescribeRTSNativeSDKPlayFailStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRTSNativeSDKPlayFailStatusWithOptions(request, runtime);
}

model DescribeRTSNativeSDKPlayTimeRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameList?: [ string ](name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayTimeShrinkRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameListShrink?: string(name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayTimeResponseBody = {
  dataInterval?: string(name='DataInterval'),
  endTime?: string(name='EndTime'),
  playTimeData?: [ 
    {
      playTime?: string(name='PlayTime'),
      stallTime?: string(name='StallTime'),
      timeStamp?: string(name='TimeStamp'),
    }
  ](name='PlayTimeData'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKPlayTimeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRTSNativeSDKPlayTimeResponseBody(name='body'),
}

async function describeRTSNativeSDKPlayTimeWithOptions(tmpReq: DescribeRTSNativeSDKPlayTimeRequest, runtime: Util.RuntimeOptions): DescribeRTSNativeSDKPlayTimeResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeRTSNativeSDKPlayTimeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.domainNameList)) {
    request.domainNameListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.domainNameList, 'DomainNameList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataInterval)) {
    query['DataInterval'] = request.dataInterval;
  }
  if (!Util.isUnset(request.domainNameListShrink)) {
    query['DomainNameList'] = request.domainNameListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRTSNativeSDKPlayTime',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRTSNativeSDKPlayTime(request: DescribeRTSNativeSDKPlayTimeRequest): DescribeRTSNativeSDKPlayTimeResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRTSNativeSDKPlayTimeWithOptions(request, runtime);
}

model DescribeRTSNativeSDKVvDataRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameList?: [ string ](name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKVvDataShrinkRequest {
  dataInterval?: string(name='DataInterval'),
  domainNameListShrink?: string(name='DomainNameList'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeRTSNativeSDKVvDataResponseBody = {
  dataInterval?: string(name='DataInterval'),
  endTime?: string(name='EndTime'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  vvData?: [ 
    {
      timeStamp?: string(name='TimeStamp'),
      vvSuccess?: string(name='VvSuccess'),
      vvTotal?: string(name='VvTotal'),
    }
  ](name='VvData'),
}

model DescribeRTSNativeSDKVvDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRTSNativeSDKVvDataResponseBody(name='body'),
}

async function describeRTSNativeSDKVvDataWithOptions(tmpReq: DescribeRTSNativeSDKVvDataRequest, runtime: Util.RuntimeOptions): DescribeRTSNativeSDKVvDataResponse {
  Util.validateModel(tmpReq);
  var request = new DescribeRTSNativeSDKVvDataShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.domainNameList)) {
    request.domainNameListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.domainNameList, 'DomainNameList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.dataInterval)) {
    query['DataInterval'] = request.dataInterval;
  }
  if (!Util.isUnset(request.domainNameListShrink)) {
    query['DomainNameList'] = request.domainNameListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRTSNativeSDKVvData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRTSNativeSDKVvData(request: DescribeRTSNativeSDKVvDataRequest): DescribeRTSNativeSDKVvDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRTSNativeSDKVvDataWithOptions(request, runtime);
}

model DescribeRoomKickoutUserListRequest {
  appId?: string(name='AppId'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  roomId?: string(name='RoomId'),
}

model DescribeRoomKickoutUserListResponseBody = {
  requestId?: string(name='RequestId'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
  userList?: [ 
    {
      appUid?: string(name='AppUid'),
      opEndTime?: string(name='OpEndTime'),
      opStartTime?: string(name='OpStartTime'),
    }
  ](name='UserList'),
}

model DescribeRoomKickoutUserListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRoomKickoutUserListResponseBody(name='body'),
}

async function describeRoomKickoutUserListWithOptions(request: DescribeRoomKickoutUserListRequest, runtime: Util.RuntimeOptions): DescribeRoomKickoutUserListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRoomKickoutUserList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRoomKickoutUserList(request: DescribeRoomKickoutUserListRequest): DescribeRoomKickoutUserListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRoomKickoutUserListWithOptions(request, runtime);
}

model DescribeRoomListRequest {
  anchorId?: string(name='AnchorId'),
  appId?: string(name='AppId'),
  endTime?: string(name='EndTime'),
  order?: string(name='Order'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  roomId?: string(name='RoomId'),
  roomStatus?: int32(name='RoomStatus'),
  startTime?: string(name='StartTime'),
}

model DescribeRoomListResponseBody = {
  requestId?: string(name='RequestId'),
  roomList?: [ 
    {
      anchorId?: string(name='AnchorId'),
      createTime?: string(name='CreateTime'),
      forbidStream?: string(name='ForbidStream'),
      roomId?: string(name='RoomId'),
      roomStatus?: int32(name='RoomStatus'),
    }
  ](name='RoomList'),
  totalNum?: int32(name='TotalNum'),
  totalPage?: int32(name='TotalPage'),
}

model DescribeRoomListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRoomListResponseBody(name='body'),
}

async function describeRoomListWithOptions(request: DescribeRoomListRequest, runtime: Util.RuntimeOptions): DescribeRoomListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.anchorId)) {
    query['AnchorId'] = request.anchorId;
  }
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.roomStatus)) {
    query['RoomStatus'] = request.roomStatus;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRoomList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRoomList(request: DescribeRoomListRequest): DescribeRoomListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRoomListWithOptions(request, runtime);
}

model DescribeRoomStatusRequest {
  appId?: string(name='AppId'),
  ownerId?: long(name='OwnerId'),
  roomId?: string(name='RoomId'),
}

model DescribeRoomStatusResponseBody = {
  requestId?: string(name='RequestId'),
  roomStatus?: int32(name='RoomStatus'),
}

model DescribeRoomStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeRoomStatusResponseBody(name='body'),
}

async function describeRoomStatusWithOptions(request: DescribeRoomStatusRequest, runtime: Util.RuntimeOptions): DescribeRoomStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeRoomStatus',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeRoomStatus(request: DescribeRoomStatusRequest): DescribeRoomStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRoomStatusWithOptions(request, runtime);
}

model DescribeShowListRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeShowListResponseBody = {
  requestId?: string(name='RequestId'),
  showList?: string(name='ShowList'),
  showListInfo?: {
    currentShowId?: string(name='CurrentShowId'),
    highPriorityShowId?: string(name='HighPriorityShowId'),
    highPriorityShowStartTime?: string(name='HighPriorityShowStartTime'),
    showList?: {
      show?: [ 
      {
        duration?: long(name='Duration'),
        repeatTimes?: int32(name='RepeatTimes'),
        resourceInfo?: {
          liveInputType?: int32(name='LiveInputType'),
          resourceId?: string(name='ResourceId'),
          resourceType?: string(name='ResourceType'),
          resourceUrl?: string(name='ResourceUrl'),
        }(name='ResourceInfo'),
        showId?: string(name='ShowId'),
        showName?: string(name='ShowName'),
      }
    ](name='Show')
    }(name='ShowList'),
    showListRepeatTimes?: int32(name='ShowListRepeatTimes'),
    totalShowListRepeatTimes?: int32(name='TotalShowListRepeatTimes'),
  }(name='ShowListInfo'),
}

model DescribeShowListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeShowListResponseBody(name='body'),
}

async function describeShowListWithOptions(request: DescribeShowListRequest, runtime: Util.RuntimeOptions): DescribeShowListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeShowList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeShowList(request: DescribeShowListRequest): DescribeShowListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeShowListWithOptions(request, runtime);
}

model DescribeStudioLayoutsRequest {
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
}

model DescribeStudioLayoutsResponseBody = {
  requestId?: string(name='RequestId'),
  studioLayouts?: [ 
    {
      bgImageConfig?: {
        id?: string(name='Id'),
        imageUrl?: string(name='ImageUrl'),
        locationId?: string(name='LocationId'),
        materialId?: string(name='MaterialId'),
      }(name='BgImageConfig'),
      commonConfig?: {
        channelId?: string(name='ChannelId'),
        videoResourceId?: string(name='VideoResourceId'),
      }(name='CommonConfig'),
      layerOrderConfigList?: [ 
        {
          id?: string(name='Id'),
          type?: string(name='Type'),
        }
      ](name='LayerOrderConfigList'),
      layoutId?: string(name='LayoutId'),
      layoutName?: string(name='LayoutName'),
      layoutType?: string(name='LayoutType'),
      mediaInputConfigList?: [ 
        {
          channelId?: string(name='ChannelId'),
          fillMode?: string(name='FillMode'),
          heightNormalized?: float(name='HeightNormalized'),
          id?: string(name='Id'),
          imageMaterialId?: string(name='ImageMaterialId'),
          index?: int32(name='Index'),
          positionNormalized?: [ float ](name='PositionNormalized'),
          positionRefer?: string(name='PositionRefer'),
          videoResourceId?: string(name='VideoResourceId'),
          widthNormalized?: float(name='WidthNormalized'),
        }
      ](name='MediaInputConfigList'),
      screenInputConfigList?: [ 
        {
          audioConfig?: {
            validChannel?: string(name='ValidChannel'),
            volumeRate?: float(name='VolumeRate'),
          }(name='AudioConfig'),
          channelId?: string(name='ChannelId'),
          color?: string(name='Color'),
          heightNormalized?: float(name='HeightNormalized'),
          id?: string(name='Id'),
          index?: int32(name='Index'),
          onlyAudio?: boolean(name='OnlyAudio'),
          portraitType?: int32(name='PortraitType'),
          positionX?: string(name='PositionX'),
          positionY?: string(name='PositionY'),
          videoResourceId?: string(name='VideoResourceId'),
        }
      ](name='ScreenInputConfigList'),
    }
  ](name='StudioLayouts'),
  total?: int32(name='Total'),
}

model DescribeStudioLayoutsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeStudioLayoutsResponseBody(name='body'),
}

async function describeStudioLayoutsWithOptions(request: DescribeStudioLayoutsRequest, runtime: Util.RuntimeOptions): DescribeStudioLayoutsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeStudioLayouts',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeStudioLayouts(request: DescribeStudioLayoutsRequest): DescribeStudioLayoutsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeStudioLayoutsWithOptions(request, runtime);
}

model DescribeToutiaoLivePlayRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
  stream?: string(name='Stream'),
}

model DescribeToutiaoLivePlayResponseBody = {
  content?: [ 
    {
      app?: string(name='App'),
      bandwidth?: float(name='Bandwidth'),
      cdnName?: string(name='CdnName'),
      domain?: string(name='Domain'),
      playNum?: long(name='PlayNum'),
      streamName?: string(name='StreamName'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Content'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
}

model DescribeToutiaoLivePlayResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeToutiaoLivePlayResponseBody(name='body'),
}

async function describeToutiaoLivePlayWithOptions(request: DescribeToutiaoLivePlayRequest, runtime: Util.RuntimeOptions): DescribeToutiaoLivePlayResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeToutiaoLivePlay',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeToutiaoLivePlay(request: DescribeToutiaoLivePlayRequest): DescribeToutiaoLivePlayResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeToutiaoLivePlayWithOptions(request, runtime);
}

model DescribeToutiaoLivePublishRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
  stream?: string(name='Stream'),
}

model DescribeToutiaoLivePublishResponseBody = {
  content?: [ 
    {
      app?: string(name='App'),
      bitrate?: float(name='Bitrate'),
      bwDiff?: float(name='BwDiff'),
      cdnName?: string(name='CdnName'),
      domain?: string(name='Domain'),
      flr?: float(name='Flr'),
      fps?: float(name='Fps'),
      streamName?: string(name='StreamName'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Content'),
  description?: string(name='Description'),
  requestId?: string(name='RequestId'),
}

model DescribeToutiaoLivePublishResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeToutiaoLivePublishResponseBody(name='body'),
}

async function describeToutiaoLivePublishWithOptions(request: DescribeToutiaoLivePublishRequest, runtime: Util.RuntimeOptions): DescribeToutiaoLivePublishResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeToutiaoLivePublish',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeToutiaoLivePublish(request: DescribeToutiaoLivePublishRequest): DescribeToutiaoLivePublishResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeToutiaoLivePublishWithOptions(request, runtime);
}

model DescribeUpBpsPeakDataRequest {
  domainName?: string(name='DomainName'),
  domainSwitch?: string(name='DomainSwitch'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeUpBpsPeakDataResponseBody = {
  describeUpPeakTraffics?: {
    describeUpPeakTraffic?: [ 
    {
      bandWidth?: string(name='BandWidth'),
      peakTime?: string(name='PeakTime'),
      queryTime?: string(name='QueryTime'),
      statName?: string(name='StatName'),
    }
  ](name='DescribeUpPeakTraffic')
  }(name='DescribeUpPeakTraffics'),
  requestId?: string(name='RequestId'),
}

model DescribeUpBpsPeakDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeUpBpsPeakDataResponseBody(name='body'),
}

async function describeUpBpsPeakDataWithOptions(request: DescribeUpBpsPeakDataRequest, runtime: Util.RuntimeOptions): DescribeUpBpsPeakDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.domainSwitch)) {
    query['DomainSwitch'] = request.domainSwitch;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUpBpsPeakData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUpBpsPeakData(request: DescribeUpBpsPeakDataRequest): DescribeUpBpsPeakDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUpBpsPeakDataWithOptions(request, runtime);
}

model DescribeUpBpsPeakOfLineRequest {
  domainName?: string(name='DomainName'),
  domainSwitch?: string(name='DomainSwitch'),
  endTime?: string(name='EndTime'),
  line?: string(name='Line'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeUpBpsPeakOfLineResponseBody = {
  describeUpBpsPeakOfLines?: {
    describeUpBpsPeakOfLine?: [ 
    {
      bandWidth?: float(name='BandWidth'),
      peakTime?: string(name='PeakTime'),
      queryTime?: string(name='QueryTime'),
      statName?: string(name='StatName'),
    }
  ](name='DescribeUpBpsPeakOfLine')
  }(name='DescribeUpBpsPeakOfLines'),
  requestId?: string(name='RequestId'),
}

model DescribeUpBpsPeakOfLineResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeUpBpsPeakOfLineResponseBody(name='body'),
}

async function describeUpBpsPeakOfLineWithOptions(request: DescribeUpBpsPeakOfLineRequest, runtime: Util.RuntimeOptions): DescribeUpBpsPeakOfLineResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.domainSwitch)) {
    query['DomainSwitch'] = request.domainSwitch;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.line)) {
    query['Line'] = request.line;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUpBpsPeakOfLine',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUpBpsPeakOfLine(request: DescribeUpBpsPeakOfLineRequest): DescribeUpBpsPeakOfLineResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUpBpsPeakOfLineWithOptions(request, runtime);
}

model DescribeUpPeakPublishStreamDataRequest {
  domainName?: string(name='DomainName'),
  domainSwitch?: string(name='DomainSwitch'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime'),
}

model DescribeUpPeakPublishStreamDataResponseBody = {
  describeUpPeakPublishStreamDatas?: {
    describeUpPeakPublishStreamData?: [ 
    {
      bandWidth?: string(name='BandWidth'),
      peakTime?: string(name='PeakTime'),
      publishStreamNum?: int32(name='PublishStreamNum'),
      queryTime?: string(name='QueryTime'),
      statName?: string(name='StatName'),
    }
  ](name='DescribeUpPeakPublishStreamData')
  }(name='DescribeUpPeakPublishStreamDatas'),
  requestId?: string(name='RequestId'),
}

model DescribeUpPeakPublishStreamDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeUpPeakPublishStreamDataResponseBody(name='body'),
}

async function describeUpPeakPublishStreamDataWithOptions(request: DescribeUpPeakPublishStreamDataRequest, runtime: Util.RuntimeOptions): DescribeUpPeakPublishStreamDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.domainSwitch)) {
    query['DomainSwitch'] = request.domainSwitch;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeUpPeakPublishStreamData',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeUpPeakPublishStreamData(request: DescribeUpPeakPublishStreamDataRequest): DescribeUpPeakPublishStreamDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUpPeakPublishStreamDataWithOptions(request, runtime);
}

model DisableLiveRealtimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model DisableLiveRealtimeLogDeliveryResponseBody = {
  requestId?: string(name='RequestId'),
}

model DisableLiveRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DisableLiveRealtimeLogDeliveryResponseBody(name='body'),
}

async function disableLiveRealtimeLogDeliveryWithOptions(request: DisableLiveRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): DisableLiveRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DisableLiveRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function disableLiveRealtimeLogDelivery(request: DisableLiveRealtimeLogDeliveryRequest): DisableLiveRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return disableLiveRealtimeLogDeliveryWithOptions(request, runtime);
}

model DynamicUpdateWaterMarkStreamRuleRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  ownerId?: long(name='OwnerId'),
  stream?: string(name='Stream'),
  templateId?: string(name='TemplateId'),
}

model DynamicUpdateWaterMarkStreamRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model DynamicUpdateWaterMarkStreamRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DynamicUpdateWaterMarkStreamRuleResponseBody(name='body'),
}

async function dynamicUpdateWaterMarkStreamRuleWithOptions(request: DynamicUpdateWaterMarkStreamRuleRequest, runtime: Util.RuntimeOptions): DynamicUpdateWaterMarkStreamRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DynamicUpdateWaterMarkStreamRule',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function dynamicUpdateWaterMarkStreamRule(request: DynamicUpdateWaterMarkStreamRuleRequest): DynamicUpdateWaterMarkStreamRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return dynamicUpdateWaterMarkStreamRuleWithOptions(request, runtime);
}

model EditPlaylistRequest {
  ownerId?: long(name='OwnerId'),
  programConfig?: string(name='ProgramConfig'),
  programId?: string(name='ProgramId'),
  programItems?: string(name='ProgramItems'),
}

model EditPlaylistResponseBody = {
  casterId?: string(name='CasterId'),
  items?: {
    failedItems?: [ 
      {
        itemId?: string(name='ItemId'),
        itemName?: string(name='ItemName'),
      }
    ](name='FailedItems'),
    successItems?: [ 
      {
        itemId?: string(name='ItemId'),
        itemName?: string(name='ItemName'),
      }
    ](name='SuccessItems'),
  }(name='Items'),
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model EditPlaylistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EditPlaylistResponseBody(name='body'),
}

async function editPlaylistWithOptions(request: EditPlaylistRequest, runtime: Util.RuntimeOptions): EditPlaylistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programConfig)) {
    query['ProgramConfig'] = request.programConfig;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  if (!Util.isUnset(request.programItems)) {
    query['ProgramItems'] = request.programItems;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EditPlaylist',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function editPlaylist(request: EditPlaylistRequest): EditPlaylistResponse {
  var runtime = new Util.RuntimeOptions{};
  return editPlaylistWithOptions(request, runtime);
}

model EditShowAndReplaceRequest {
  casterId?: string(name='CasterId'),
  endTime?: float(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  showId?: string(name='ShowId'),
  startTime?: float(name='StartTime'),
  storageInfo?: string(name='StorageInfo'),
  userData?: string(name='UserData'),
}

model EditShowAndReplaceResponseBody = {
  jobInfo?: string(name='JobInfo'),
  requestId?: string(name='RequestId'),
}

model EditShowAndReplaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EditShowAndReplaceResponseBody(name='body'),
}

async function editShowAndReplaceWithOptions(request: EditShowAndReplaceRequest, runtime: Util.RuntimeOptions): EditShowAndReplaceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.storageInfo)) {
    query['StorageInfo'] = request.storageInfo;
  }
  if (!Util.isUnset(request.userData)) {
    query['UserData'] = request.userData;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EditShowAndReplace',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function editShowAndReplace(request: EditShowAndReplaceRequest): EditShowAndReplaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return editShowAndReplaceWithOptions(request, runtime);
}

model EffectCasterUrgentRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model EffectCasterUrgentResponseBody = {
  requestId?: string(name='RequestId'),
}

model EffectCasterUrgentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EffectCasterUrgentResponseBody(name='body'),
}

async function effectCasterUrgentWithOptions(request: EffectCasterUrgentRequest, runtime: Util.RuntimeOptions): EffectCasterUrgentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EffectCasterUrgent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function effectCasterUrgent(request: EffectCasterUrgentRequest): EffectCasterUrgentResponse {
  var runtime = new Util.RuntimeOptions{};
  return effectCasterUrgentWithOptions(request, runtime);
}

model EffectCasterVideoResourceRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  resourceId?: string(name='ResourceId'),
  sceneId?: string(name='SceneId'),
}

model EffectCasterVideoResourceResponseBody = {
  requestId?: string(name='RequestId'),
}

model EffectCasterVideoResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EffectCasterVideoResourceResponseBody(name='body'),
}

async function effectCasterVideoResourceWithOptions(request: EffectCasterVideoResourceRequest, runtime: Util.RuntimeOptions): EffectCasterVideoResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EffectCasterVideoResource',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function effectCasterVideoResource(request: EffectCasterVideoResourceRequest): EffectCasterVideoResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return effectCasterVideoResourceWithOptions(request, runtime);
}

model EnableLiveRealtimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model EnableLiveRealtimeLogDeliveryResponseBody = {
  requestId?: string(name='RequestId'),
}

model EnableLiveRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EnableLiveRealtimeLogDeliveryResponseBody(name='body'),
}

async function enableLiveRealtimeLogDeliveryWithOptions(request: EnableLiveRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): EnableLiveRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableLiveRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function enableLiveRealtimeLogDelivery(request: EnableLiveRealtimeLogDeliveryRequest): EnableLiveRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableLiveRealtimeLogDeliveryWithOptions(request, runtime);
}

model ForbidLiveStreamRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  liveStreamType?: string(name='LiveStreamType'),
  oneshot?: string(name='Oneshot'),
  ownerId?: long(name='OwnerId'),
  resumeTime?: string(name='ResumeTime'),
  streamName?: string(name='StreamName'),
}

model ForbidLiveStreamResponseBody = {
  requestId?: string(name='RequestId'),
}

model ForbidLiveStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ForbidLiveStreamResponseBody(name='body'),
}

async function forbidLiveStreamWithOptions(request: ForbidLiveStreamRequest, runtime: Util.RuntimeOptions): ForbidLiveStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!Util.isUnset(request.oneshot)) {
    query['Oneshot'] = request.oneshot;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resumeTime)) {
    query['ResumeTime'] = request.resumeTime;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ForbidLiveStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function forbidLiveStream(request: ForbidLiveStreamRequest): ForbidLiveStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return forbidLiveStreamWithOptions(request, runtime);
}

model ForbidPushStreamRequest {
  appId?: string(name='AppId'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  roomId?: string(name='RoomId'),
  userData?: string(name='UserData'),
}

model ForbidPushStreamResponseBody = {
  requestId?: string(name='RequestId'),
}

model ForbidPushStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ForbidPushStreamResponseBody(name='body'),
}

async function forbidPushStreamWithOptions(request: ForbidPushStreamRequest, runtime: Util.RuntimeOptions): ForbidPushStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userData)) {
    query['UserData'] = request.userData;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ForbidPushStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function forbidPushStream(request: ForbidPushStreamRequest): ForbidPushStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return forbidPushStreamWithOptions(request, runtime);
}

model GetAllCustomTemplatesRequest {
  ownerId?: long(name='OwnerId'),
  userId?: string(name='UserId'),
}

model GetAllCustomTemplatesResponseBody = {
  customTemplates?: string(name='CustomTemplates'),
  requestId?: string(name='RequestId'),
}

model GetAllCustomTemplatesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetAllCustomTemplatesResponseBody(name='body'),
}

async function getAllCustomTemplatesWithOptions(request: GetAllCustomTemplatesRequest, runtime: Util.RuntimeOptions): GetAllCustomTemplatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAllCustomTemplates',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getAllCustomTemplates(request: GetAllCustomTemplatesRequest): GetAllCustomTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAllCustomTemplatesWithOptions(request, runtime);
}

model GetCustomTemplateRequest {
  ownerId?: long(name='OwnerId'),
  template?: string(name='Template'),
}

model GetCustomTemplateResponseBody = {
  customTemplate?: string(name='CustomTemplate'),
  requestId?: string(name='RequestId'),
  template?: string(name='Template'),
}

model GetCustomTemplateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCustomTemplateResponseBody(name='body'),
}

async function getCustomTemplateWithOptions(request: GetCustomTemplateRequest, runtime: Util.RuntimeOptions): GetCustomTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.template)) {
    query['Template'] = request.template;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCustomTemplate',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCustomTemplate(request: GetCustomTemplateRequest): GetCustomTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCustomTemplateWithOptions(request, runtime);
}

model GetEditingJobInfoRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  showId?: string(name='ShowId'),
}

model GetEditingJobInfoResponseBody = {
  casterId?: string(name='CasterId'),
  editingTasksInfo?: string(name='EditingTasksInfo'),
  requestId?: string(name='RequestId'),
}

model GetEditingJobInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetEditingJobInfoResponseBody(name='body'),
}

async function getEditingJobInfoWithOptions(request: GetEditingJobInfoRequest, runtime: Util.RuntimeOptions): GetEditingJobInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetEditingJobInfo',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getEditingJobInfo(request: GetEditingJobInfoRequest): GetEditingJobInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getEditingJobInfoWithOptions(request, runtime);
}

model GetMessageAppRequest {
  appId?: string(name='AppId'),
}

model GetMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    appConfig?: map[string]string(name='AppConfig'),
    appId?: string(name='AppId'),
    appName?: string(name='AppName'),
    createTime?: long(name='CreateTime'),
    extension?: map[string]string(name='Extension'),
    status?: int32(name='Status'),
  }(name='Result'),
}

model GetMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMessageAppResponseBody(name='body'),
}

async function getMessageAppWithOptions(request: GetMessageAppRequest, runtime: Util.RuntimeOptions): GetMessageAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMessageApp(request: GetMessageAppRequest): GetMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMessageAppWithOptions(request, runtime);
}

model GetMessageGroupRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
}

model GetMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    createTime?: long(name='CreateTime'),
    creatorId?: string(name='CreatorId'),
    extension?: map[string]any(name='Extension'),
    groupId?: string(name='GroupId'),
    isMuteAll?: boolean(name='IsMuteAll'),
    status?: int32(name='Status'),
  }(name='Result'),
}

model GetMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMessageGroupResponseBody(name='body'),
}

async function getMessageGroupWithOptions(request: GetMessageGroupRequest, runtime: Util.RuntimeOptions): GetMessageGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMessageGroup(request: GetMessageGroupRequest): GetMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMessageGroupWithOptions(request, runtime);
}

model GetMessageTokenRequest {
  appId?: string(name='AppId'),
  deviceId?: string(name='DeviceId'),
  deviceType?: string(name='DeviceType'),
  userId?: string(name='UserId'),
}

model GetMessageTokenResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    accessToken?: string(name='AccessToken'),
    accessTokenExpiredTime?: long(name='AccessTokenExpiredTime'),
    refreshToken?: string(name='RefreshToken'),
  }(name='Result'),
}

model GetMessageTokenResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMessageTokenResponseBody(name='body'),
}

async function getMessageTokenWithOptions(request: GetMessageTokenRequest, runtime: Util.RuntimeOptions): GetMessageTokenResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMessageToken',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMessageToken(request: GetMessageTokenRequest): GetMessageTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMessageTokenWithOptions(request, runtime);
}

model GetMultiRateConfigRequest {
  app?: string(name='App'),
  domainName?: string(name='DomainName'),
  groupId?: string(name='GroupId'),
  ownerId?: long(name='OwnerId'),
}

model GetMultiRateConfigResponseBody = {
  app?: string(name='App'),
  avFormat?: string(name='AvFormat'),
  code?: int32(name='Code'),
  domain?: string(name='Domain'),
  groupId?: string(name='GroupId'),
  isLazy?: string(name='IsLazy'),
  isTimeAlign?: string(name='IsTimeAlign'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  stream?: string(name='Stream'),
  templatesInfo?: {
    detail?: [ 
    {
      audioBitrate?: int32(name='AudioBitrate'),
      audioChannelNum?: int32(name='AudioChannelNum'),
      audioCodec?: string(name='AudioCodec'),
      audioProfile?: string(name='AudioProfile'),
      audioRate?: int32(name='AudioRate'),
      bandWidth?: int32(name='BandWidth'),
      fps?: int32(name='Fps'),
      gop?: string(name='Gop'),
      height?: int32(name='Height'),
      profile?: int32(name='Profile'),
      template?: string(name='Template'),
      templateType?: string(name='TemplateType'),
      videoBitrate?: int32(name='VideoBitrate'),
      width?: int32(name='Width'),
    }
  ](name='Detail')
  }(name='TemplatesInfo'),
}

model GetMultiRateConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMultiRateConfigResponseBody(name='body'),
}

async function getMultiRateConfigWithOptions(request: GetMultiRateConfigRequest, runtime: Util.RuntimeOptions): GetMultiRateConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMultiRateConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMultiRateConfig(request: GetMultiRateConfigRequest): GetMultiRateConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMultiRateConfigWithOptions(request, runtime);
}

model GetMultiRateConfigListRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model GetMultiRateConfigListResponseBody = {
  code?: int32(name='Code'),
  groupInfo?: {
    info?: [ 
    {
      app?: string(name='App'),
      avFormat?: string(name='AvFormat'),
      count?: int32(name='Count'),
      groupId?: string(name='GroupId'),
    }
  ](name='Info')
  }(name='GroupInfo'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetMultiRateConfigListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMultiRateConfigListResponseBody(name='body'),
}

async function getMultiRateConfigListWithOptions(request: GetMultiRateConfigListRequest, runtime: Util.RuntimeOptions): GetMultiRateConfigListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMultiRateConfigList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMultiRateConfigList(request: GetMultiRateConfigListRequest): GetMultiRateConfigListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMultiRateConfigListWithOptions(request, runtime);
}

model HotLiveRtcStreamRequest {
  appName?: string(name='AppName'),
  audioMsid?: string(name='AudioMsid'),
  connectionTimeout?: string(name='ConnectionTimeout'),
  domainName?: string(name='DomainName'),
  mediaTimeout?: string(name='MediaTimeout'),
  ownerId?: long(name='OwnerId'),
  regionCode?: string(name='RegionCode'),
  streamName?: string(name='StreamName'),
  videoMsid?: string(name='VideoMsid'),
}

model HotLiveRtcStreamResponseBody = {
  requestId?: string(name='RequestId'),
}

model HotLiveRtcStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: HotLiveRtcStreamResponseBody(name='body'),
}

async function hotLiveRtcStreamWithOptions(request: HotLiveRtcStreamRequest, runtime: Util.RuntimeOptions): HotLiveRtcStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.audioMsid)) {
    query['AudioMsid'] = request.audioMsid;
  }
  if (!Util.isUnset(request.connectionTimeout)) {
    query['ConnectionTimeout'] = request.connectionTimeout;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.mediaTimeout)) {
    query['MediaTimeout'] = request.mediaTimeout;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.regionCode)) {
    query['RegionCode'] = request.regionCode;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.videoMsid)) {
    query['VideoMsid'] = request.videoMsid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'HotLiveRtcStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function hotLiveRtcStream(request: HotLiveRtcStreamRequest): HotLiveRtcStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return hotLiveRtcStreamWithOptions(request, runtime);
}

model InitializeAutoShowListTaskRequest {
  callBackUrl?: string(name='CallBackUrl'),
  casterConfig?: string(name='CasterConfig'),
  domainName?: string(name='DomainName'),
  endTime?: long(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  resourceIds?: string(name='ResourceIds'),
  startTime?: long(name='StartTime'),
}

model InitializeAutoShowListTaskResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
  streamList?: string(name='StreamList'),
}

model InitializeAutoShowListTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: InitializeAutoShowListTaskResponseBody(name='body'),
}

async function initializeAutoShowListTaskWithOptions(request: InitializeAutoShowListTaskRequest, runtime: Util.RuntimeOptions): InitializeAutoShowListTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callBackUrl)) {
    query['CallBackUrl'] = request.callBackUrl;
  }
  if (!Util.isUnset(request.casterConfig)) {
    query['CasterConfig'] = request.casterConfig;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InitializeAutoShowListTask',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function initializeAutoShowListTask(request: InitializeAutoShowListTaskRequest): InitializeAutoShowListTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return initializeAutoShowListTaskWithOptions(request, runtime);
}

model JoinMessageGroupRequest {
  appId?: string(name='AppId'),
  broadCastStatistics?: boolean(name='BroadCastStatistics'),
  broadCastType?: int32(name='BroadCastType'),
  groupId?: string(name='GroupId'),
  userId?: string(name='UserId'),
}

model JoinMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model JoinMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: JoinMessageGroupResponseBody(name='body'),
}

async function joinMessageGroupWithOptions(request: JoinMessageGroupRequest, runtime: Util.RuntimeOptions): JoinMessageGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.broadCastStatistics)) {
    body['BroadCastStatistics'] = request.broadCastStatistics;
  }
  if (!Util.isUnset(request.broadCastType)) {
    body['BroadCastType'] = request.broadCastType;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'JoinMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function joinMessageGroup(request: JoinMessageGroupRequest): JoinMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return joinMessageGroupWithOptions(request, runtime);
}

model LeaveMessageGroupRequest {
  appId?: string(name='AppId'),
  broadCastStatistics?: boolean(name='BroadCastStatistics'),
  broadCastType?: int32(name='BroadCastType'),
  groupId?: string(name='GroupId'),
  userId?: string(name='UserId'),
}

model LeaveMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model LeaveMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: LeaveMessageGroupResponseBody(name='body'),
}

async function leaveMessageGroupWithOptions(request: LeaveMessageGroupRequest, runtime: Util.RuntimeOptions): LeaveMessageGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.broadCastStatistics)) {
    body['BroadCastStatistics'] = request.broadCastStatistics;
  }
  if (!Util.isUnset(request.broadCastType)) {
    body['BroadCastType'] = request.broadCastType;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'LeaveMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function leaveMessageGroup(request: LeaveMessageGroupRequest): LeaveMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return leaveMessageGroupWithOptions(request, runtime);
}

model ListLiveRealtimeLogDeliveryRequest {
  liveOpenapiReserve?: string(name='LiveOpenapiReserve'),
  ownerId?: long(name='OwnerId'),
}

model ListLiveRealtimeLogDeliveryResponseBody = {
  content?: {
    realtimeLogDeliveryInfo?: [ 
    {
      dmId?: int32(name='DmId'),
      domainName?: string(name='DomainName'),
      logstore?: string(name='Logstore'),
      project?: string(name='Project'),
      region?: string(name='Region'),
      status?: string(name='Status'),
    }
  ](name='RealtimeLogDeliveryInfo')
  }(name='Content'),
  requestId?: string(name='RequestId'),
}

model ListLiveRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveRealtimeLogDeliveryResponseBody(name='body'),
}

async function listLiveRealtimeLogDeliveryWithOptions(request: ListLiveRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): ListLiveRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveRealtimeLogDelivery(request: ListLiveRealtimeLogDeliveryRequest): ListLiveRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRealtimeLogDeliveryWithOptions(request, runtime);
}

model ListLiveRealtimeLogDeliveryDomainsRequest {
  logstore?: string(name='Logstore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  region?: string(name='Region'),
}

model ListLiveRealtimeLogDeliveryDomainsResponseBody = {
  content?: {
    domains?: [ 
    {
      domainName?: string(name='DomainName'),
      status?: string(name='Status'),
    }
  ](name='Domains')
  }(name='Content'),
  requestId?: string(name='RequestId'),
}

model ListLiveRealtimeLogDeliveryDomainsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveRealtimeLogDeliveryDomainsResponseBody(name='body'),
}

async function listLiveRealtimeLogDeliveryDomainsWithOptions(request: ListLiveRealtimeLogDeliveryDomainsRequest, runtime: Util.RuntimeOptions): ListLiveRealtimeLogDeliveryDomainsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveRealtimeLogDeliveryDomains',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveRealtimeLogDeliveryDomains(request: ListLiveRealtimeLogDeliveryDomainsRequest): ListLiveRealtimeLogDeliveryDomainsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRealtimeLogDeliveryDomainsWithOptions(request, runtime);
}

model ListLiveRealtimeLogDeliveryInfosRequest {
  liveOpenapiReserve?: string(name='LiveOpenapiReserve'),
  ownerId?: long(name='OwnerId'),
}

model ListLiveRealtimeLogDeliveryInfosResponseBody = {
  content?: {
    realtimeLogDeliveryInfos?: [ 
    {
      logstore?: string(name='Logstore'),
      project?: string(name='Project'),
      region?: string(name='Region'),
    }
  ](name='RealtimeLogDeliveryInfos')
  }(name='Content'),
  requestId?: string(name='RequestId'),
}

model ListLiveRealtimeLogDeliveryInfosResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveRealtimeLogDeliveryInfosResponseBody(name='body'),
}

async function listLiveRealtimeLogDeliveryInfosWithOptions(request: ListLiveRealtimeLogDeliveryInfosRequest, runtime: Util.RuntimeOptions): ListLiveRealtimeLogDeliveryInfosResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveRealtimeLogDeliveryInfos',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveRealtimeLogDeliveryInfos(request: ListLiveRealtimeLogDeliveryInfosRequest): ListLiveRealtimeLogDeliveryInfosResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRealtimeLogDeliveryInfosWithOptions(request, runtime);
}

model ListMessageRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortType?: int32(name='SortType'),
  type?: int32(name='Type'),
}

model ListMessageResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    messageList?: [ 
      {
        data?: string(name='Data'),
        groupId?: string(name='GroupId'),
        messageId?: string(name='MessageId'),
        senderId?: string(name='SenderId'),
        type?: int32(name='Type'),
      }
    ](name='MessageList'),
  }(name='Result'),
}

model ListMessageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMessageResponseBody(name='body'),
}

async function listMessageWithOptions(request: ListMessageRequest, runtime: Util.RuntimeOptions): ListMessageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMessage',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMessage(request: ListMessageRequest): ListMessageResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMessageWithOptions(request, runtime);
}

model ListMessageAppRequest {
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortType?: int32(name='SortType'),
}

model ListMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    appList?: [ 
      {
        appConfig?: map[string]string(name='AppConfig'),
        appId?: string(name='AppId'),
        appName?: string(name='AppName'),
        createTime?: long(name='CreateTime'),
        extension?: map[string]string(name='Extension'),
        status?: int32(name='Status'),
      }
    ](name='AppList'),
    hasMore?: boolean(name='HasMore'),
    total?: int32(name='Total'),
  }(name='Result'),
}

model ListMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMessageAppResponseBody(name='body'),
}

async function listMessageAppWithOptions(request: ListMessageAppRequest, runtime: Util.RuntimeOptions): ListMessageAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMessageApp(request: ListMessageAppRequest): ListMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMessageAppWithOptions(request, runtime);
}

model ListMessageGroupRequest {
  appId?: string(name='AppId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortType?: int32(name='SortType'),
  userId?: string(name='UserId'),
}

model ListMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    groupList?: [ 
      {
        appId?: string(name='AppId'),
        createTime?: long(name='CreateTime'),
        creatorId?: string(name='CreatorId'),
        extension?: map[string]string(name='Extension'),
        groupId?: string(name='GroupId'),
        status?: int32(name='Status'),
      }
    ](name='GroupList'),
    hasMore?: boolean(name='HasMore'),
    total?: int32(name='Total'),
  }(name='Result'),
}

model ListMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMessageGroupResponseBody(name='body'),
}

async function listMessageGroupWithOptions(request: ListMessageGroupRequest, runtime: Util.RuntimeOptions): ListMessageGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMessageGroup(request: ListMessageGroupRequest): ListMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMessageGroupWithOptions(request, runtime);
}

model ListMessageGroupUserRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortType?: int32(name='SortType'),
}

model ListMessageGroupUserResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    total?: int32(name='Total'),
    userList?: [ 
      {
        joinTime?: long(name='JoinTime'),
        userId?: string(name='UserId'),
      }
    ](name='UserList'),
  }(name='Result'),
}

model ListMessageGroupUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMessageGroupUserResponseBody(name='body'),
}

async function listMessageGroupUserWithOptions(request: ListMessageGroupUserRequest, runtime: Util.RuntimeOptions): ListMessageGroupUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMessageGroupUser',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMessageGroupUser(request: ListMessageGroupUserRequest): ListMessageGroupUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMessageGroupUserWithOptions(request, runtime);
}

model ListMessageGroupUserByIdRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
  userIdList?: [ string ](name='UserIdList'),
}

model ListMessageGroupUserByIdShrinkRequest {
  appId?: string(name='AppId'),
  groupId?: string(name='GroupId'),
  userIdListShrink?: string(name='UserIdList'),
}

model ListMessageGroupUserByIdResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    total?: int32(name='Total'),
    userList?: [ 
      {
        isMute?: boolean(name='IsMute'),
        muteBy?: [ string ](name='MuteBy'),
        userAvatar?: string(name='UserAvatar'),
        userExtension?: string(name='UserExtension'),
        userId?: string(name='UserId'),
        userNick?: string(name='UserNick'),
      }
    ](name='UserList'),
  }(name='Result'),
}

model ListMessageGroupUserByIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMessageGroupUserByIdResponseBody(name='body'),
}

async function listMessageGroupUserByIdWithOptions(tmpReq: ListMessageGroupUserByIdRequest, runtime: Util.RuntimeOptions): ListMessageGroupUserByIdResponse {
  Util.validateModel(tmpReq);
  var request = new ListMessageGroupUserByIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userIdList)) {
    request.userIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userIdList, 'UserIdList', 'simple');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.userIdListShrink)) {
    body['UserIdList'] = request.userIdListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMessageGroupUserById',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMessageGroupUserById(request: ListMessageGroupUserByIdRequest): ListMessageGroupUserByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMessageGroupUserByIdWithOptions(request, runtime);
}

model ListPlaylistRequest {
  ownerId?: long(name='OwnerId'),
  page?: int32(name='Page'),
  pageSize?: int32(name='PageSize'),
  programId?: string(name='ProgramId'),
}

model ListPlaylistResponseBody = {
  programList?: [ 
    {
      casterId?: string(name='CasterId'),
      domainName?: string(name='DomainName'),
      programId?: string(name='ProgramId'),
      programName?: string(name='ProgramName'),
      repeatNumber?: int32(name='RepeatNumber'),
      status?: int32(name='Status'),
    }
  ](name='ProgramList'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListPlaylistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPlaylistResponseBody(name='body'),
}

async function listPlaylistWithOptions(request: ListPlaylistRequest, runtime: Util.RuntimeOptions): ListPlaylistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.page)) {
    query['Page'] = request.page;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPlaylist',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPlaylist(request: ListPlaylistRequest): ListPlaylistResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPlaylistWithOptions(request, runtime);
}

model ListPlaylistItemsRequest {
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
  programItemIds?: string(name='ProgramItemIds'),
}

model ListPlaylistItemsResponseBody = {
  programItems?: [ 
    {
      index?: int32(name='Index'),
      programId?: string(name='ProgramId'),
      programItemId?: string(name='ProgramItemId'),
      programItemName?: string(name='ProgramItemName'),
      resourceType?: string(name='ResourceType'),
      resourceValue?: string(name='ResourceValue'),
    }
  ](name='ProgramItems'),
  requestId?: string(name='RequestId'),
  total?: int32(name='Total'),
}

model ListPlaylistItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPlaylistItemsResponseBody(name='body'),
}

async function listPlaylistItemsWithOptions(request: ListPlaylistItemsRequest, runtime: Util.RuntimeOptions): ListPlaylistItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  if (!Util.isUnset(request.programItemIds)) {
    query['ProgramItemIds'] = request.programItemIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListPlaylistItems',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPlaylistItems(request: ListPlaylistItemsRequest): ListPlaylistItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPlaylistItemsWithOptions(request, runtime);
}

model ModifyCasterComponentRequest {
  captionLayerContent?: string(name='CaptionLayerContent'),
  casterId?: string(name='CasterId'),
  componentId?: string(name='ComponentId'),
  componentLayer?: string(name='ComponentLayer'),
  componentName?: string(name='ComponentName'),
  componentType?: string(name='ComponentType'),
  effect?: string(name='Effect'),
  imageLayerContent?: string(name='ImageLayerContent'),
  ownerId?: long(name='OwnerId'),
  textLayerContent?: string(name='TextLayerContent'),
}

model ModifyCasterComponentResponseBody = {
  componentId?: string(name='ComponentId'),
  requestId?: string(name='RequestId'),
}

model ModifyCasterComponentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyCasterComponentResponseBody(name='body'),
}

async function modifyCasterComponentWithOptions(request: ModifyCasterComponentRequest, runtime: Util.RuntimeOptions): ModifyCasterComponentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.captionLayerContent)) {
    query['CaptionLayerContent'] = request.captionLayerContent;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.componentLayer)) {
    query['ComponentLayer'] = request.componentLayer;
  }
  if (!Util.isUnset(request.componentName)) {
    query['ComponentName'] = request.componentName;
  }
  if (!Util.isUnset(request.componentType)) {
    query['ComponentType'] = request.componentType;
  }
  if (!Util.isUnset(request.effect)) {
    query['Effect'] = request.effect;
  }
  if (!Util.isUnset(request.imageLayerContent)) {
    query['ImageLayerContent'] = request.imageLayerContent;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.textLayerContent)) {
    query['TextLayerContent'] = request.textLayerContent;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCasterComponent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCasterComponent(request: ModifyCasterComponentRequest): ModifyCasterComponentResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCasterComponentWithOptions(request, runtime);
}

model ModifyCasterEpisodeRequest {
  casterId?: string(name='CasterId'),
  componentId?: [ string ](name='ComponentId'),
  endTime?: string(name='EndTime'),
  episodeId?: string(name='EpisodeId'),
  episodeName?: string(name='EpisodeName'),
  ownerId?: long(name='OwnerId'),
  resourceId?: string(name='ResourceId'),
  startTime?: string(name='StartTime'),
  switchType?: string(name='SwitchType'),
}

model ModifyCasterEpisodeResponseBody = {
  casterId?: string(name='CasterId'),
  episodeId?: string(name='EpisodeId'),
  requestId?: string(name='RequestId'),
}

model ModifyCasterEpisodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyCasterEpisodeResponseBody(name='body'),
}

async function modifyCasterEpisodeWithOptions(request: ModifyCasterEpisodeRequest, runtime: Util.RuntimeOptions): ModifyCasterEpisodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.episodeId)) {
    query['EpisodeId'] = request.episodeId;
  }
  if (!Util.isUnset(request.episodeName)) {
    query['EpisodeName'] = request.episodeName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.switchType)) {
    query['SwitchType'] = request.switchType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCasterEpisode',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCasterEpisode(request: ModifyCasterEpisodeRequest): ModifyCasterEpisodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCasterEpisodeWithOptions(request, runtime);
}

model ModifyCasterLayoutRequest {
  audioLayer?: [ 
    {
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      validChannel?: string(name='ValidChannel'),
      volumeRate?: float(name='VolumeRate'),
    }
  ](name='AudioLayer'),
  blendList?: [ string ](name='BlendList'),
  casterId?: string(name='CasterId'),
  layoutId?: string(name='LayoutId'),
  mixList?: [ string ](name='MixList'),
  ownerId?: long(name='OwnerId'),
  videoLayer?: [ 
    {
      fillMode?: string(name='FillMode'),
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      heightNormalized?: float(name='HeightNormalized'),
      positionNormalized?: [ float ](name='PositionNormalized'),
      positionRefer?: string(name='PositionRefer'),
      widthNormalized?: float(name='WidthNormalized'),
    }
  ](name='VideoLayer'),
}

model ModifyCasterLayoutResponseBody = {
  layoutId?: string(name='LayoutId'),
  requestId?: string(name='RequestId'),
}

model ModifyCasterLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyCasterLayoutResponseBody(name='body'),
}

async function modifyCasterLayoutWithOptions(request: ModifyCasterLayoutRequest, runtime: Util.RuntimeOptions): ModifyCasterLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.audioLayer)) {
    query['AudioLayer'] = request.audioLayer;
  }
  if (!Util.isUnset(request.blendList)) {
    query['BlendList'] = request.blendList;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.mixList)) {
    query['MixList'] = request.mixList;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.videoLayer)) {
    query['VideoLayer'] = request.videoLayer;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCasterLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCasterLayout(request: ModifyCasterLayoutRequest): ModifyCasterLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCasterLayoutWithOptions(request, runtime);
}

model ModifyCasterProgramRequest {
  casterId?: string(name='CasterId'),
  episode?: [ 
    {
      componentId?: [ string ](name='ComponentId'),
      endTime?: string(name='EndTime'),
      episodeId?: string(name='EpisodeId'),
      episodeName?: string(name='EpisodeName'),
      episodeType?: string(name='EpisodeType'),
      resourceId?: string(name='ResourceId'),
      startTime?: string(name='StartTime'),
      switchType?: string(name='SwitchType'),
    }
  ](name='Episode'),
  ownerId?: long(name='OwnerId'),
}

model ModifyCasterProgramResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model ModifyCasterProgramResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyCasterProgramResponseBody(name='body'),
}

async function modifyCasterProgramWithOptions(request: ModifyCasterProgramRequest, runtime: Util.RuntimeOptions): ModifyCasterProgramResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.episode)) {
    query['Episode'] = request.episode;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCasterProgram',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCasterProgram(request: ModifyCasterProgramRequest): ModifyCasterProgramResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCasterProgramWithOptions(request, runtime);
}

model ModifyCasterVideoResourceRequest {
  beginOffset?: int32(name='BeginOffset'),
  casterId?: string(name='CasterId'),
  endOffset?: int32(name='EndOffset'),
  liveStreamUrl?: string(name='LiveStreamUrl'),
  materialId?: string(name='MaterialId'),
  ownerId?: long(name='OwnerId'),
  ptsCallbackInterval?: int32(name='PtsCallbackInterval'),
  repeatNum?: int32(name='RepeatNum'),
  resourceId?: string(name='ResourceId'),
  resourceName?: string(name='ResourceName'),
  vodUrl?: string(name='VodUrl'),
}

model ModifyCasterVideoResourceResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
  resourceId?: string(name='ResourceId'),
}

model ModifyCasterVideoResourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyCasterVideoResourceResponseBody(name='body'),
}

async function modifyCasterVideoResourceWithOptions(request: ModifyCasterVideoResourceRequest, runtime: Util.RuntimeOptions): ModifyCasterVideoResourceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.beginOffset)) {
    query['BeginOffset'] = request.beginOffset;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.endOffset)) {
    query['EndOffset'] = request.endOffset;
  }
  if (!Util.isUnset(request.liveStreamUrl)) {
    query['LiveStreamUrl'] = request.liveStreamUrl;
  }
  if (!Util.isUnset(request.materialId)) {
    query['MaterialId'] = request.materialId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ptsCallbackInterval)) {
    query['PtsCallbackInterval'] = request.ptsCallbackInterval;
  }
  if (!Util.isUnset(request.repeatNum)) {
    query['RepeatNum'] = request.repeatNum;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceName)) {
    query['ResourceName'] = request.resourceName;
  }
  if (!Util.isUnset(request.vodUrl)) {
    query['VodUrl'] = request.vodUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCasterVideoResource',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyCasterVideoResource(request: ModifyCasterVideoResourceRequest): ModifyCasterVideoResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCasterVideoResourceWithOptions(request, runtime);
}

model ModifyLiveDomainSchdmByPropertyRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  property?: string(name='Property'),
}

model ModifyLiveDomainSchdmByPropertyResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyLiveDomainSchdmByPropertyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyLiveDomainSchdmByPropertyResponseBody(name='body'),
}

async function modifyLiveDomainSchdmByPropertyWithOptions(request: ModifyLiveDomainSchdmByPropertyRequest, runtime: Util.RuntimeOptions): ModifyLiveDomainSchdmByPropertyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.property)) {
    query['Property'] = request.property;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLiveDomainSchdmByProperty',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyLiveDomainSchdmByProperty(request: ModifyLiveDomainSchdmByPropertyRequest): ModifyLiveDomainSchdmByPropertyResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLiveDomainSchdmByPropertyWithOptions(request, runtime);
}

model ModifyLiveRealtimeLogDeliveryRequest {
  domainName?: string(name='DomainName'),
  logstore?: string(name='Logstore'),
  ownerId?: long(name='OwnerId'),
  project?: string(name='Project'),
  region?: string(name='Region'),
}

model ModifyLiveRealtimeLogDeliveryResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyLiveRealtimeLogDeliveryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyLiveRealtimeLogDeliveryResponseBody(name='body'),
}

async function modifyLiveRealtimeLogDeliveryWithOptions(request: ModifyLiveRealtimeLogDeliveryRequest, runtime: Util.RuntimeOptions): ModifyLiveRealtimeLogDeliveryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyLiveRealtimeLogDelivery',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyLiveRealtimeLogDelivery(request: ModifyLiveRealtimeLogDeliveryRequest): ModifyLiveRealtimeLogDeliveryResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyLiveRealtimeLogDeliveryWithOptions(request, runtime);
}

model ModifyShowListRequest {
  casterId?: string(name='CasterId'),
  highPriorityShowId?: string(name='HighPriorityShowId'),
  highPriorityShowStartTime?: string(name='HighPriorityShowStartTime'),
  ownerId?: long(name='OwnerId'),
  repeatTimes?: int32(name='RepeatTimes'),
  showId?: string(name='ShowId'),
  spot?: int32(name='Spot'),
}

model ModifyShowListResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyShowListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyShowListResponseBody(name='body'),
}

async function modifyShowListWithOptions(request: ModifyShowListRequest, runtime: Util.RuntimeOptions): ModifyShowListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.highPriorityShowId)) {
    query['HighPriorityShowId'] = request.highPriorityShowId;
  }
  if (!Util.isUnset(request.highPriorityShowStartTime)) {
    query['HighPriorityShowStartTime'] = request.highPriorityShowStartTime;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.repeatTimes)) {
    query['RepeatTimes'] = request.repeatTimes;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  if (!Util.isUnset(request.spot)) {
    query['Spot'] = request.spot;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyShowList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyShowList(request: ModifyShowListRequest): ModifyShowListResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyShowListWithOptions(request, runtime);
}

model ModifyStudioLayoutRequest {
  bgImageConfig?: string(name='BgImageConfig'),
  casterId?: string(name='CasterId'),
  commonConfig?: string(name='CommonConfig'),
  layerOrderConfigList?: string(name='LayerOrderConfigList'),
  layoutId?: string(name='LayoutId'),
  layoutName?: string(name='LayoutName'),
  mediaInputConfigList?: string(name='MediaInputConfigList'),
  ownerId?: long(name='OwnerId'),
  screenInputConfigList?: string(name='ScreenInputConfigList'),
}

model ModifyStudioLayoutResponseBody = {
  requestId?: string(name='RequestId'),
}

model ModifyStudioLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyStudioLayoutResponseBody(name='body'),
}

async function modifyStudioLayoutWithOptions(request: ModifyStudioLayoutRequest, runtime: Util.RuntimeOptions): ModifyStudioLayoutResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bgImageConfig)) {
    query['BgImageConfig'] = request.bgImageConfig;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.commonConfig)) {
    query['CommonConfig'] = request.commonConfig;
  }
  if (!Util.isUnset(request.layerOrderConfigList)) {
    query['LayerOrderConfigList'] = request.layerOrderConfigList;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.layoutName)) {
    query['LayoutName'] = request.layoutName;
  }
  if (!Util.isUnset(request.mediaInputConfigList)) {
    query['MediaInputConfigList'] = request.mediaInputConfigList;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.screenInputConfigList)) {
    query['ScreenInputConfigList'] = request.screenInputConfigList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyStudioLayout',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyStudioLayout(request: ModifyStudioLayoutRequest): ModifyStudioLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyStudioLayoutWithOptions(request, runtime);
}

model OpenLiveShiftRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  duration?: int32(name='Duration'),
  ignoreTranscode?: boolean(name='IgnoreTranscode'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
  vision?: int32(name='Vision'),
}

model OpenLiveShiftResponseBody = {
  requestId?: string(name='RequestId'),
}

model OpenLiveShiftResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: OpenLiveShiftResponseBody(name='body'),
}

async function openLiveShiftWithOptions(request: OpenLiveShiftRequest, runtime: Util.RuntimeOptions): OpenLiveShiftResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.duration)) {
    query['Duration'] = request.duration;
  }
  if (!Util.isUnset(request.ignoreTranscode)) {
    query['IgnoreTranscode'] = request.ignoreTranscode;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.vision)) {
    query['Vision'] = request.vision;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'OpenLiveShift',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function openLiveShift(request: OpenLiveShiftRequest): OpenLiveShiftResponse {
  var runtime = new Util.RuntimeOptions{};
  return openLiveShiftWithOptions(request, runtime);
}

model PlayChoosenShowRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  showId?: string(name='ShowId'),
}

model PlayChoosenShowResponseBody = {
  requestId?: string(name='RequestId'),
  showId?: string(name='ShowId'),
}

model PlayChoosenShowResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PlayChoosenShowResponseBody(name='body'),
}

async function playChoosenShowWithOptions(request: PlayChoosenShowRequest, runtime: Util.RuntimeOptions): PlayChoosenShowResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PlayChoosenShow',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function playChoosenShow(request: PlayChoosenShowRequest): PlayChoosenShowResponse {
  var runtime = new Util.RuntimeOptions{};
  return playChoosenShowWithOptions(request, runtime);
}

model PublishLiveStagingConfigToProductionRequest {
  domainName?: string(name='DomainName'),
  functionName?: string(name='FunctionName'),
  ownerId?: long(name='OwnerId'),
}

model PublishLiveStagingConfigToProductionResponseBody = {
  requestId?: string(name='RequestId'),
}

model PublishLiveStagingConfigToProductionResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PublishLiveStagingConfigToProductionResponseBody(name='body'),
}

async function publishLiveStagingConfigToProductionWithOptions(request: PublishLiveStagingConfigToProductionRequest, runtime: Util.RuntimeOptions): PublishLiveStagingConfigToProductionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.functionName)) {
    query['FunctionName'] = request.functionName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PublishLiveStagingConfigToProduction',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function publishLiveStagingConfigToProduction(request: PublishLiveStagingConfigToProductionRequest): PublishLiveStagingConfigToProductionResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishLiveStagingConfigToProductionWithOptions(request, runtime);
}

model QueryMessageAppRequest {
  appId?: string(name='AppId'),
  appName?: string(name='AppName'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  sortType?: int32(name='SortType'),
}

model QueryMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: [ 
    {
      appList?: [ 
        {
          appConfig?: map[string]string(name='AppConfig'),
          appId?: string(name='AppId'),
          appName?: string(name='AppName'),
          createTime?: long(name='CreateTime'),
          extension?: map[string]string(name='Extension'),
          status?: int32(name='Status'),
        }
      ](name='AppList'),
      hasMore?: boolean(name='HasMore'),
      totalCount?: int32(name='TotalCount'),
    }
  ](name='Result'),
}

model QueryMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryMessageAppResponseBody(name='body'),
}

async function queryMessageAppWithOptions(request: QueryMessageAppRequest, runtime: Util.RuntimeOptions): QueryMessageAppResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryMessageApp(request: QueryMessageAppRequest): QueryMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMessageAppWithOptions(request, runtime);
}

model QuerySnapshotCallbackAuthRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model QuerySnapshotCallbackAuthResponseBody = {
  callbackAuthKey?: string(name='CallbackAuthKey'),
  callbackReqAuth?: string(name='CallbackReqAuth'),
  domainName?: string(name='DomainName'),
  requestId?: string(name='RequestId'),
}

model QuerySnapshotCallbackAuthResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QuerySnapshotCallbackAuthResponseBody(name='body'),
}

async function querySnapshotCallbackAuthWithOptions(request: QuerySnapshotCallbackAuthRequest, runtime: Util.RuntimeOptions): QuerySnapshotCallbackAuthResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QuerySnapshotCallbackAuth',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function querySnapshotCallbackAuth(request: QuerySnapshotCallbackAuthRequest): QuerySnapshotCallbackAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySnapshotCallbackAuthWithOptions(request, runtime);
}

model RealTimeRecordCommandRequest {
  appName?: string(name='AppName'),
  command?: string(name='Command'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model RealTimeRecordCommandResponseBody = {
  requestId?: string(name='RequestId'),
}

model RealTimeRecordCommandResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RealTimeRecordCommandResponseBody(name='body'),
}

async function realTimeRecordCommandWithOptions(request: RealTimeRecordCommandRequest, runtime: Util.RuntimeOptions): RealTimeRecordCommandResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.command)) {
    query['Command'] = request.command;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RealTimeRecordCommand',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function realTimeRecordCommand(request: RealTimeRecordCommandRequest): RealTimeRecordCommandResponse {
  var runtime = new Util.RuntimeOptions{};
  return realTimeRecordCommandWithOptions(request, runtime);
}

model RealTimeSnapshotCommandRequest {
  appName?: string(name='AppName'),
  command?: string(name='Command'),
  domainName?: string(name='DomainName'),
  interval?: int32(name='Interval'),
  mode?: int32(name='Mode'),
  ownerId?: long(name='OwnerId'),
  source?: int32(name='Source'),
  streamName?: string(name='StreamName'),
}

model RealTimeSnapshotCommandResponseBody = {
  requestId?: string(name='RequestId'),
}

model RealTimeSnapshotCommandResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RealTimeSnapshotCommandResponseBody(name='body'),
}

async function realTimeSnapshotCommandWithOptions(request: RealTimeSnapshotCommandRequest, runtime: Util.RuntimeOptions): RealTimeSnapshotCommandResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.command)) {
    query['Command'] = request.command;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.mode)) {
    query['Mode'] = request.mode;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.source)) {
    query['Source'] = request.source;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RealTimeSnapshotCommand',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function realTimeSnapshotCommand(request: RealTimeSnapshotCommandRequest): RealTimeSnapshotCommandResponse {
  var runtime = new Util.RuntimeOptions{};
  return realTimeSnapshotCommandWithOptions(request, runtime);
}

model RemoveShowFromShowListRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  showId?: string(name='ShowId'),
  isBatchMode?: boolean(name='isBatchMode'),
  showIdList?: [ string ](name='showIdList'),
}

model RemoveShowFromShowListResponseBody = {
  requestId?: string(name='RequestId'),
  showId?: string(name='ShowId'),
  failedList?: string(name='failedList'),
  successfulShowIds?: string(name='successfulShowIds'),
}

model RemoveShowFromShowListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveShowFromShowListResponseBody(name='body'),
}

async function removeShowFromShowListWithOptions(request: RemoveShowFromShowListRequest, runtime: Util.RuntimeOptions): RemoveShowFromShowListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  if (!Util.isUnset(request.isBatchMode)) {
    query['isBatchMode'] = request.isBatchMode;
  }
  if (!Util.isUnset(request.showIdList)) {
    query['showIdList'] = request.showIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveShowFromShowList',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeShowFromShowList(request: RemoveShowFromShowListRequest): RemoveShowFromShowListResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeShowFromShowListWithOptions(request, runtime);
}

model RestartCasterRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model RestartCasterResponseBody = {
  requestId?: string(name='RequestId'),
}

model RestartCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RestartCasterResponseBody(name='body'),
}

async function restartCasterWithOptions(request: RestartCasterRequest, runtime: Util.RuntimeOptions): RestartCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RestartCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function restartCaster(request: RestartCasterRequest): RestartCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return restartCasterWithOptions(request, runtime);
}

model ResumeLiveStreamRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  liveStreamType?: string(name='LiveStreamType'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  streamName?: string(name='StreamName'),
}

model ResumeLiveStreamResponseBody = {
  requestId?: string(name='RequestId'),
}

model ResumeLiveStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ResumeLiveStreamResponseBody(name='body'),
}

async function resumeLiveStreamWithOptions(request: ResumeLiveStreamRequest, runtime: Util.RuntimeOptions): ResumeLiveStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ResumeLiveStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function resumeLiveStream(request: ResumeLiveStreamRequest): ResumeLiveStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return resumeLiveStreamWithOptions(request, runtime);
}

model RollbackLiveStagingConfigRequest {
  domainName?: string(name='DomainName'),
  functionName?: string(name='FunctionName'),
  ownerId?: long(name='OwnerId'),
}

model RollbackLiveStagingConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model RollbackLiveStagingConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RollbackLiveStagingConfigResponseBody(name='body'),
}

async function rollbackLiveStagingConfigWithOptions(request: RollbackLiveStagingConfigRequest, runtime: Util.RuntimeOptions): RollbackLiveStagingConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.functionName)) {
    query['FunctionName'] = request.functionName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RollbackLiveStagingConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rollbackLiveStagingConfig(request: RollbackLiveStagingConfigRequest): RollbackLiveStagingConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return rollbackLiveStagingConfigWithOptions(request, runtime);
}

model SendLikeRequest {
  appId?: string(name='AppId'),
  broadCastType?: int32(name='BroadCastType'),
  count?: string(name='Count'),
  groupId?: string(name='GroupId'),
  operatorUserId?: string(name='OperatorUserId'),
}

model SendLikeResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    likeCount?: int32(name='LikeCount'),
  }(name='Result'),
}

model SendLikeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendLikeResponseBody(name='body'),
}

async function sendLikeWithOptions(request: SendLikeRequest, runtime: Util.RuntimeOptions): SendLikeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.broadCastType)) {
    body['BroadCastType'] = request.broadCastType;
  }
  if (!Util.isUnset(request.count)) {
    body['Count'] = request.count;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.operatorUserId)) {
    body['OperatorUserId'] = request.operatorUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendLike',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendLike(request: SendLikeRequest): SendLikeResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendLikeWithOptions(request, runtime);
}

model SendMessageToGroupRequest {
  appId?: string(name='AppId'),
  data?: string(name='Data'),
  groupId?: string(name='GroupId'),
  operatorUserId?: string(name='OperatorUserId'),
  type?: int32(name='Type'),
}

model SendMessageToGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    messageId?: string(name='MessageId'),
  }(name='Result'),
}

model SendMessageToGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendMessageToGroupResponseBody(name='body'),
}

async function sendMessageToGroupWithOptions(request: SendMessageToGroupRequest, runtime: Util.RuntimeOptions): SendMessageToGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.operatorUserId)) {
    body['OperatorUserId'] = request.operatorUserId;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendMessageToGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendMessageToGroup(request: SendMessageToGroupRequest): SendMessageToGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendMessageToGroupWithOptions(request, runtime);
}

model SendMessageToGroupUsersRequest {
  appId?: string(name='AppId'),
  data?: string(name='Data'),
  groupId?: string(name='GroupId'),
  operatorUserId?: string(name='OperatorUserId'),
  receiverIdList?: [ string ](name='ReceiverIdList'),
  type?: int32(name='Type'),
}

model SendMessageToGroupUsersShrinkRequest {
  appId?: string(name='AppId'),
  data?: string(name='Data'),
  groupId?: string(name='GroupId'),
  operatorUserId?: string(name='OperatorUserId'),
  receiverIdListShrink?: string(name='ReceiverIdList'),
  type?: int32(name='Type'),
}

model SendMessageToGroupUsersResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    messageId?: string(name='MessageId'),
  }(name='Result'),
}

model SendMessageToGroupUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendMessageToGroupUsersResponseBody(name='body'),
}

async function sendMessageToGroupUsersWithOptions(tmpReq: SendMessageToGroupUsersRequest, runtime: Util.RuntimeOptions): SendMessageToGroupUsersResponse {
  Util.validateModel(tmpReq);
  var request = new SendMessageToGroupUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.receiverIdList)) {
    request.receiverIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.receiverIdList, 'ReceiverIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.operatorUserId)) {
    body['OperatorUserId'] = request.operatorUserId;
  }
  if (!Util.isUnset(request.receiverIdListShrink)) {
    body['ReceiverIdList'] = request.receiverIdListShrink;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendMessageToGroupUsers',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendMessageToGroupUsers(request: SendMessageToGroupUsersRequest): SendMessageToGroupUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendMessageToGroupUsersWithOptions(request, runtime);
}

model SendRoomNotificationRequest {
  appId?: string(name='AppId'),
  appUid?: string(name='AppUid'),
  data?: string(name='Data'),
  ownerId?: long(name='OwnerId'),
  priority?: int32(name='Priority'),
  roomId?: string(name='RoomId'),
}

model SendRoomNotificationResponseBody = {
  messageId?: string(name='MessageId'),
  requestId?: string(name='RequestId'),
}

model SendRoomNotificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendRoomNotificationResponseBody(name='body'),
}

async function sendRoomNotificationWithOptions(request: SendRoomNotificationRequest, runtime: Util.RuntimeOptions): SendRoomNotificationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appUid)) {
    query['AppUid'] = request.appUid;
  }
  if (!Util.isUnset(request.data)) {
    query['Data'] = request.data;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SendRoomNotification',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendRoomNotification(request: SendRoomNotificationRequest): SendRoomNotificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendRoomNotificationWithOptions(request, runtime);
}

model SendRoomUserNotificationRequest {
  appId?: string(name='AppId'),
  appUid?: string(name='AppUid'),
  data?: string(name='Data'),
  ownerId?: long(name='OwnerId'),
  priority?: int32(name='Priority'),
  roomId?: string(name='RoomId'),
  toAppUid?: string(name='ToAppUid'),
}

model SendRoomUserNotificationResponseBody = {
  messageId?: string(name='MessageId'),
  requestId?: string(name='RequestId'),
}

model SendRoomUserNotificationResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendRoomUserNotificationResponseBody(name='body'),
}

async function sendRoomUserNotificationWithOptions(request: SendRoomUserNotificationRequest, runtime: Util.RuntimeOptions): SendRoomUserNotificationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appUid)) {
    query['AppUid'] = request.appUid;
  }
  if (!Util.isUnset(request.data)) {
    query['Data'] = request.data;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.roomId)) {
    query['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.toAppUid)) {
    query['ToAppUid'] = request.toAppUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SendRoomUserNotification',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendRoomUserNotification(request: SendRoomUserNotificationRequest): SendRoomUserNotificationResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendRoomUserNotificationWithOptions(request, runtime);
}

model SetCasterChannelRequest {
  casterId?: string(name='CasterId'),
  channelId?: string(name='ChannelId'),
  faceBeauty?: string(name='FaceBeauty'),
  ownerId?: long(name='OwnerId'),
  playStatus?: int32(name='PlayStatus'),
  resourceId?: string(name='ResourceId'),
  seekOffset?: int32(name='SeekOffset'),
}

model SetCasterChannelResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetCasterChannelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetCasterChannelResponseBody(name='body'),
}

async function setCasterChannelWithOptions(request: SetCasterChannelRequest, runtime: Util.RuntimeOptions): SetCasterChannelResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.faceBeauty)) {
    query['FaceBeauty'] = request.faceBeauty;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.playStatus)) {
    query['PlayStatus'] = request.playStatus;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.seekOffset)) {
    query['SeekOffset'] = request.seekOffset;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCasterChannel',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setCasterChannel(request: SetCasterChannelRequest): SetCasterChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCasterChannelWithOptions(request, runtime);
}

model SetCasterConfigRequest {
  callbackUrl?: string(name='CallbackUrl'),
  casterId?: string(name='CasterId'),
  casterName?: string(name='CasterName'),
  channelEnable?: int32(name='ChannelEnable'),
  delay?: float(name='Delay'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  programEffect?: int32(name='ProgramEffect'),
  programName?: string(name='ProgramName'),
  recordConfig?: string(name='RecordConfig'),
  sideOutputUrl?: string(name='SideOutputUrl'),
  sideOutputUrlList?: string(name='SideOutputUrlList'),
  syncGroupsConfig?: string(name='SyncGroupsConfig'),
  transcodeConfig?: string(name='TranscodeConfig'),
  urgentLiveStreamUrl?: string(name='UrgentLiveStreamUrl'),
  urgentMaterialId?: string(name='UrgentMaterialId'),
}

model SetCasterConfigResponseBody = {
  casterId?: string(name='CasterId'),
  requestId?: string(name='RequestId'),
}

model SetCasterConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetCasterConfigResponseBody(name='body'),
}

async function setCasterConfigWithOptions(request: SetCasterConfigRequest, runtime: Util.RuntimeOptions): SetCasterConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callbackUrl)) {
    query['CallbackUrl'] = request.callbackUrl;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.casterName)) {
    query['CasterName'] = request.casterName;
  }
  if (!Util.isUnset(request.channelEnable)) {
    query['ChannelEnable'] = request.channelEnable;
  }
  if (!Util.isUnset(request.delay)) {
    query['Delay'] = request.delay;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programEffect)) {
    query['ProgramEffect'] = request.programEffect;
  }
  if (!Util.isUnset(request.programName)) {
    query['ProgramName'] = request.programName;
  }
  if (!Util.isUnset(request.recordConfig)) {
    query['RecordConfig'] = request.recordConfig;
  }
  if (!Util.isUnset(request.sideOutputUrl)) {
    query['SideOutputUrl'] = request.sideOutputUrl;
  }
  if (!Util.isUnset(request.sideOutputUrlList)) {
    query['SideOutputUrlList'] = request.sideOutputUrlList;
  }
  if (!Util.isUnset(request.syncGroupsConfig)) {
    query['SyncGroupsConfig'] = request.syncGroupsConfig;
  }
  if (!Util.isUnset(request.transcodeConfig)) {
    query['TranscodeConfig'] = request.transcodeConfig;
  }
  if (!Util.isUnset(request.urgentLiveStreamUrl)) {
    query['UrgentLiveStreamUrl'] = request.urgentLiveStreamUrl;
  }
  if (!Util.isUnset(request.urgentMaterialId)) {
    query['UrgentMaterialId'] = request.urgentMaterialId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCasterConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setCasterConfig(request: SetCasterConfigRequest): SetCasterConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCasterConfigWithOptions(request, runtime);
}

model SetCasterSceneConfigRequest {
  casterId?: string(name='CasterId'),
  componentId?: [ string ](name='ComponentId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model SetCasterSceneConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetCasterSceneConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetCasterSceneConfigResponseBody(name='body'),
}

async function setCasterSceneConfigWithOptions(request: SetCasterSceneConfigRequest, runtime: Util.RuntimeOptions): SetCasterSceneConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCasterSceneConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setCasterSceneConfig(request: SetCasterSceneConfigRequest): SetCasterSceneConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCasterSceneConfigWithOptions(request, runtime);
}

model SetCasterSyncGroupRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  syncGroup?: [ 
    {
      hostResourceId?: string(name='HostResourceId'),
      mode?: int32(name='Mode'),
      resourceIds?: [ string ](name='ResourceIds'),
      syncDelayThreshold?: long(name='SyncDelayThreshold'),
      syncOffsets?: [ int32 ](name='SyncOffsets'),
    }
  ](name='SyncGroup'),
}

model SetCasterSyncGroupResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetCasterSyncGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetCasterSyncGroupResponseBody(name='body'),
}

async function setCasterSyncGroupWithOptions(request: SetCasterSyncGroupRequest, runtime: Util.RuntimeOptions): SetCasterSyncGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.syncGroup)) {
    query['SyncGroup'] = request.syncGroup;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCasterSyncGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setCasterSyncGroup(request: SetCasterSyncGroupRequest): SetCasterSyncGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCasterSyncGroupWithOptions(request, runtime);
}

model SetCasterTimedEventRequest {
  casterId?: string(name='CasterId'),
  eventName?: string(name='EventName'),
  ownerId?: long(name='OwnerId'),
  startTimeUTC?: string(name='StartTimeUTC'),
}

model SetCasterTimedEventResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetCasterTimedEventResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetCasterTimedEventResponseBody(name='body'),
}

async function setCasterTimedEventWithOptions(request: SetCasterTimedEventRequest, runtime: Util.RuntimeOptions): SetCasterTimedEventResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.eventName)) {
    query['EventName'] = request.eventName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.startTimeUTC)) {
    query['StartTimeUTC'] = request.startTimeUTC;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetCasterTimedEvent',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setCasterTimedEvent(request: SetCasterTimedEventRequest): SetCasterTimedEventResponse {
  var runtime = new Util.RuntimeOptions{};
  return setCasterTimedEventWithOptions(request, runtime);
}

model SetLiveDomainCertificateRequest {
  certName?: string(name='CertName'),
  certType?: string(name='CertType'),
  domainName?: string(name='DomainName'),
  forceSet?: string(name='ForceSet'),
  ownerId?: long(name='OwnerId'),
  SSLPri?: string(name='SSLPri'),
  SSLProtocol?: string(name='SSLProtocol'),
  SSLPub?: string(name='SSLPub'),
  securityToken?: string(name='SecurityToken'),
}

model SetLiveDomainCertificateResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveDomainCertificateResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveDomainCertificateResponseBody(name='body'),
}

async function setLiveDomainCertificateWithOptions(request: SetLiveDomainCertificateRequest, runtime: Util.RuntimeOptions): SetLiveDomainCertificateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.certName)) {
    query['CertName'] = request.certName;
  }
  if (!Util.isUnset(request.certType)) {
    query['CertType'] = request.certType;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.forceSet)) {
    query['ForceSet'] = request.forceSet;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.SSLPri)) {
    query['SSLPri'] = request.SSLPri;
  }
  if (!Util.isUnset(request.SSLProtocol)) {
    query['SSLProtocol'] = request.SSLProtocol;
  }
  if (!Util.isUnset(request.SSLPub)) {
    query['SSLPub'] = request.SSLPub;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveDomainCertificate',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveDomainCertificate(request: SetLiveDomainCertificateRequest): SetLiveDomainCertificateResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveDomainCertificateWithOptions(request, runtime);
}

model SetLiveDomainStagingConfigRequest {
  domainName?: string(name='DomainName'),
  functions?: string(name='Functions'),
  ownerId?: long(name='OwnerId'),
}

model SetLiveDomainStagingConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveDomainStagingConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveDomainStagingConfigResponseBody(name='body'),
}

async function setLiveDomainStagingConfigWithOptions(request: SetLiveDomainStagingConfigRequest, runtime: Util.RuntimeOptions): SetLiveDomainStagingConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.functions)) {
    query['Functions'] = request.functions;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveDomainStagingConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveDomainStagingConfig(request: SetLiveDomainStagingConfigRequest): SetLiveDomainStagingConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveDomainStagingConfigWithOptions(request, runtime);
}

model SetLiveEdgeTransferRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  httpDns?: string(name='HttpDns'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
  targetDomainList?: string(name='TargetDomainList'),
  transferArgs?: string(name='TransferArgs'),
}

model SetLiveEdgeTransferResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveEdgeTransferResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveEdgeTransferResponseBody(name='body'),
}

async function setLiveEdgeTransferWithOptions(request: SetLiveEdgeTransferRequest, runtime: Util.RuntimeOptions): SetLiveEdgeTransferResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.httpDns)) {
    query['HttpDns'] = request.httpDns;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!Util.isUnset(request.targetDomainList)) {
    query['TargetDomainList'] = request.targetDomainList;
  }
  if (!Util.isUnset(request.transferArgs)) {
    query['TransferArgs'] = request.transferArgs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveEdgeTransfer',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveEdgeTransfer(request: SetLiveEdgeTransferRequest): SetLiveEdgeTransferResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveEdgeTransferWithOptions(request, runtime);
}

model SetLiveLazyPullStreamInfoConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  pullAppName?: string(name='PullAppName'),
  pullDomainName?: string(name='PullDomainName'),
  pullProtocol?: string(name='PullProtocol'),
}

model SetLiveLazyPullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveLazyPullStreamInfoConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveLazyPullStreamInfoConfigResponseBody(name='body'),
}

async function setLiveLazyPullStreamInfoConfigWithOptions(request: SetLiveLazyPullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): SetLiveLazyPullStreamInfoConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pullAppName)) {
    query['PullAppName'] = request.pullAppName;
  }
  if (!Util.isUnset(request.pullDomainName)) {
    query['PullDomainName'] = request.pullDomainName;
  }
  if (!Util.isUnset(request.pullProtocol)) {
    query['PullProtocol'] = request.pullProtocol;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveLazyPullStreamInfoConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveLazyPullStreamInfoConfig(request: SetLiveLazyPullStreamInfoConfigRequest): SetLiveLazyPullStreamInfoConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveLazyPullStreamInfoConfigWithOptions(request, runtime);
}

model SetLiveStreamDelayConfigRequest {
  domainName?: string(name='DomainName'),
  flvDelay?: int32(name='FlvDelay'),
  flvLevel?: string(name='FlvLevel'),
  hlsDelay?: int32(name='HlsDelay'),
  hlsLevel?: string(name='HlsLevel'),
  ownerId?: long(name='OwnerId'),
  rtmpDelay?: int32(name='RtmpDelay'),
  rtmpLevel?: string(name='RtmpLevel'),
}

model SetLiveStreamDelayConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveStreamDelayConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveStreamDelayConfigResponseBody(name='body'),
}

async function setLiveStreamDelayConfigWithOptions(request: SetLiveStreamDelayConfigRequest, runtime: Util.RuntimeOptions): SetLiveStreamDelayConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.flvDelay)) {
    query['FlvDelay'] = request.flvDelay;
  }
  if (!Util.isUnset(request.flvLevel)) {
    query['FlvLevel'] = request.flvLevel;
  }
  if (!Util.isUnset(request.hlsDelay)) {
    query['HlsDelay'] = request.hlsDelay;
  }
  if (!Util.isUnset(request.hlsLevel)) {
    query['HlsLevel'] = request.hlsLevel;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.rtmpDelay)) {
    query['RtmpDelay'] = request.rtmpDelay;
  }
  if (!Util.isUnset(request.rtmpLevel)) {
    query['RtmpLevel'] = request.rtmpLevel;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveStreamDelayConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveStreamDelayConfig(request: SetLiveStreamDelayConfigRequest): SetLiveStreamDelayConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveStreamDelayConfigWithOptions(request, runtime);
}

model SetLiveStreamOptimizedFeatureConfigRequest {
  configName?: string(name='ConfigName'),
  configStatus?: string(name='ConfigStatus'),
  configValue?: string(name='ConfigValue'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model SetLiveStreamOptimizedFeatureConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveStreamOptimizedFeatureConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveStreamOptimizedFeatureConfigResponseBody(name='body'),
}

async function setLiveStreamOptimizedFeatureConfigWithOptions(request: SetLiveStreamOptimizedFeatureConfigRequest, runtime: Util.RuntimeOptions): SetLiveStreamOptimizedFeatureConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.configName)) {
    query['ConfigName'] = request.configName;
  }
  if (!Util.isUnset(request.configStatus)) {
    query['ConfigStatus'] = request.configStatus;
  }
  if (!Util.isUnset(request.configValue)) {
    query['ConfigValue'] = request.configValue;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveStreamOptimizedFeatureConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveStreamOptimizedFeatureConfig(request: SetLiveStreamOptimizedFeatureConfigRequest): SetLiveStreamOptimizedFeatureConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveStreamOptimizedFeatureConfigWithOptions(request, runtime);
}

model SetLiveStreamsNotifyUrlConfigRequest {
  domainName?: string(name='DomainName'),
  notifyAuthKey?: string(name='NotifyAuthKey'),
  notifyReqAuth?: string(name='NotifyReqAuth'),
  notifyUrl?: string(name='NotifyUrl'),
  ownerId?: long(name='OwnerId'),
}

model SetLiveStreamsNotifyUrlConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetLiveStreamsNotifyUrlConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetLiveStreamsNotifyUrlConfigResponseBody(name='body'),
}

async function setLiveStreamsNotifyUrlConfigWithOptions(request: SetLiveStreamsNotifyUrlConfigRequest, runtime: Util.RuntimeOptions): SetLiveStreamsNotifyUrlConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.notifyAuthKey)) {
    query['NotifyAuthKey'] = request.notifyAuthKey;
  }
  if (!Util.isUnset(request.notifyReqAuth)) {
    query['NotifyReqAuth'] = request.notifyReqAuth;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetLiveStreamsNotifyUrlConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setLiveStreamsNotifyUrlConfig(request: SetLiveStreamsNotifyUrlConfigRequest): SetLiveStreamsNotifyUrlConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return setLiveStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model SetSnapshotCallbackAuthRequest {
  callbackAuthKey?: string(name='CallbackAuthKey'),
  callbackReqAuth?: string(name='CallbackReqAuth'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model SetSnapshotCallbackAuthResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetSnapshotCallbackAuthResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetSnapshotCallbackAuthResponseBody(name='body'),
}

async function setSnapshotCallbackAuthWithOptions(request: SetSnapshotCallbackAuthRequest, runtime: Util.RuntimeOptions): SetSnapshotCallbackAuthResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callbackAuthKey)) {
    query['CallbackAuthKey'] = request.callbackAuthKey;
  }
  if (!Util.isUnset(request.callbackReqAuth)) {
    query['CallbackReqAuth'] = request.callbackReqAuth;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetSnapshotCallbackAuth',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setSnapshotCallbackAuth(request: SetSnapshotCallbackAuthRequest): SetSnapshotCallbackAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return setSnapshotCallbackAuthWithOptions(request, runtime);
}

model StartCasterRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model StartCasterResponseBody = {
  pgmSceneInfos?: {
    sceneInfo?: [ 
    {
      sceneId?: string(name='SceneId'),
      streamInfos?: {
        streamInfo?: [ 
        {
          outputStreamUrl?: string(name='OutputStreamUrl'),
          transcodeConfig?: string(name='TranscodeConfig'),
          videoFormat?: string(name='VideoFormat'),
        }
      ](name='StreamInfo')
      }(name='StreamInfos'),
      streamUrl?: string(name='StreamUrl'),
    }
  ](name='SceneInfo')
  }(name='PgmSceneInfos'),
  pvwSceneInfos?: {
    sceneInfo?: [ 
    {
      sceneId?: string(name='SceneId'),
      streamUrl?: string(name='StreamUrl'),
    }
  ](name='SceneInfo')
  }(name='PvwSceneInfos'),
  requestId?: string(name='RequestId'),
}

model StartCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartCasterResponseBody(name='body'),
}

async function startCasterWithOptions(request: StartCasterRequest, runtime: Util.RuntimeOptions): StartCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startCaster(request: StartCasterRequest): StartCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return startCasterWithOptions(request, runtime);
}

model StartCasterSceneRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model StartCasterSceneResponseBody = {
  requestId?: string(name='RequestId'),
  streamUrl?: string(name='StreamUrl'),
}

model StartCasterSceneResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartCasterSceneResponseBody(name='body'),
}

async function startCasterSceneWithOptions(request: StartCasterSceneRequest, runtime: Util.RuntimeOptions): StartCasterSceneResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartCasterScene',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startCasterScene(request: StartCasterSceneRequest): StartCasterSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return startCasterSceneWithOptions(request, runtime);
}

model StartLiveDomainRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model StartLiveDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model StartLiveDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartLiveDomainResponseBody(name='body'),
}

async function startLiveDomainWithOptions(request: StartLiveDomainRequest, runtime: Util.RuntimeOptions): StartLiveDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartLiveDomain',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startLiveDomain(request: StartLiveDomainRequest): StartLiveDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return startLiveDomainWithOptions(request, runtime);
}

model StartLiveStreamMonitorRequest {
  monitorId?: string(name='MonitorId'),
  ownerId?: long(name='OwnerId'),
}

model StartLiveStreamMonitorResponseBody = {
  requestId?: string(name='RequestId'),
}

model StartLiveStreamMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartLiveStreamMonitorResponseBody(name='body'),
}

async function startLiveStreamMonitorWithOptions(request: StartLiveStreamMonitorRequest, runtime: Util.RuntimeOptions): StartLiveStreamMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.monitorId)) {
    query['MonitorId'] = request.monitorId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartLiveStreamMonitor',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startLiveStreamMonitor(request: StartLiveStreamMonitorRequest): StartLiveStreamMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return startLiveStreamMonitorWithOptions(request, runtime);
}

model StartPlaylistRequest {
  offset?: int32(name='Offset'),
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
  resumeMode?: string(name='ResumeMode'),
  startItemId?: string(name='StartItemId'),
}

model StartPlaylistResponseBody = {
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
  streamInfo?: {
    appName?: string(name='AppName'),
    domainName?: string(name='DomainName'),
    streamName?: string(name='StreamName'),
    streams?: {
      stream?: [ 
      {
        pullFlvUrl?: string(name='PullFlvUrl'),
        pullM3U8Url?: string(name='PullM3U8Url'),
        pullRtmpUrl?: string(name='PullRtmpUrl'),
        quality?: string(name='Quality'),
      }
    ](name='Stream')
    }(name='Streams'),
  }(name='StreamInfo'),
}

model StartPlaylistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartPlaylistResponseBody(name='body'),
}

async function startPlaylistWithOptions(request: StartPlaylistRequest, runtime: Util.RuntimeOptions): StartPlaylistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.offset)) {
    query['Offset'] = request.offset;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  if (!Util.isUnset(request.resumeMode)) {
    query['ResumeMode'] = request.resumeMode;
  }
  if (!Util.isUnset(request.startItemId)) {
    query['StartItemId'] = request.startItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StartPlaylist',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startPlaylist(request: StartPlaylistRequest): StartPlaylistResponse {
  var runtime = new Util.RuntimeOptions{};
  return startPlaylistWithOptions(request, runtime);
}

model StopCasterRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
}

model StopCasterResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopCasterResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopCasterResponseBody(name='body'),
}

async function stopCasterWithOptions(request: StopCasterRequest, runtime: Util.RuntimeOptions): StopCasterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopCaster',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopCaster(request: StopCasterRequest): StopCasterResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopCasterWithOptions(request, runtime);
}

model StopCasterSceneRequest {
  casterId?: string(name='CasterId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model StopCasterSceneResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopCasterSceneResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopCasterSceneResponseBody(name='body'),
}

async function stopCasterSceneWithOptions(request: StopCasterSceneRequest, runtime: Util.RuntimeOptions): StopCasterSceneResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopCasterScene',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopCasterScene(request: StopCasterSceneRequest): StopCasterSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopCasterSceneWithOptions(request, runtime);
}

model StopLiveDomainRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model StopLiveDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopLiveDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopLiveDomainResponseBody(name='body'),
}

async function stopLiveDomainWithOptions(request: StopLiveDomainRequest, runtime: Util.RuntimeOptions): StopLiveDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopLiveDomain',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopLiveDomain(request: StopLiveDomainRequest): StopLiveDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveDomainWithOptions(request, runtime);
}

model StopLiveStreamMonitorRequest {
  monitorId?: string(name='MonitorId'),
  ownerId?: long(name='OwnerId'),
}

model StopLiveStreamMonitorResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopLiveStreamMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopLiveStreamMonitorResponseBody(name='body'),
}

async function stopLiveStreamMonitorWithOptions(request: StopLiveStreamMonitorRequest, runtime: Util.RuntimeOptions): StopLiveStreamMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.monitorId)) {
    query['MonitorId'] = request.monitorId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopLiveStreamMonitor',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopLiveStreamMonitor(request: StopLiveStreamMonitorRequest): StopLiveStreamMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveStreamMonitorWithOptions(request, runtime);
}

model StopPlaylistRequest {
  ownerId?: long(name='OwnerId'),
  programId?: string(name='ProgramId'),
}

model StopPlaylistResponseBody = {
  programId?: string(name='ProgramId'),
  requestId?: string(name='RequestId'),
}

model StopPlaylistResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopPlaylistResponseBody(name='body'),
}

async function stopPlaylistWithOptions(request: StopPlaylistRequest, runtime: Util.RuntimeOptions): StopPlaylistResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.programId)) {
    query['ProgramId'] = request.programId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'StopPlaylist',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopPlaylist(request: StopPlaylistRequest): StopPlaylistResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopPlaylistWithOptions(request, runtime);
}

model TagLiveResourcesRequest {
  ownerId?: long(name='OwnerId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceType?: string(name='ResourceType'),
  tag?: [ 
    {
      key?: string(name='Key'),
      value?: string(name='Value'),
    }
  ](name='Tag'),
}

model TagLiveResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model TagLiveResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TagLiveResourcesResponseBody(name='body'),
}

async function tagLiveResourcesWithOptions(request: TagLiveResourcesRequest, runtime: Util.RuntimeOptions): TagLiveResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tag)) {
    query['Tag'] = request.tag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagLiveResources',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function tagLiveResources(request: TagLiveResourcesRequest): TagLiveResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagLiveResourcesWithOptions(request, runtime);
}

model UnTagLiveResourcesRequest {
  all?: boolean(name='All'),
  ownerId?: long(name='OwnerId'),
  resourceId?: [ string ](name='ResourceId'),
  resourceType?: string(name='ResourceType'),
  tagKey?: [ string ](name='TagKey'),
}

model UnTagLiveResourcesResponseBody = {
  requestId?: string(name='RequestId'),
}

model UnTagLiveResourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnTagLiveResourcesResponseBody(name='body'),
}

async function unTagLiveResourcesWithOptions(request: UnTagLiveResourcesRequest, runtime: Util.RuntimeOptions): UnTagLiveResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKey)) {
    query['TagKey'] = request.tagKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnTagLiveResources',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unTagLiveResources(request: UnTagLiveResourcesRequest): UnTagLiveResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return unTagLiveResourcesWithOptions(request, runtime);
}

model UpdateCasterSceneAudioRequest {
  audioLayer?: [ 
    {
      fixedDelayDuration?: int32(name='FixedDelayDuration'),
      validChannel?: string(name='ValidChannel'),
      volumeRate?: float(name='VolumeRate'),
    }
  ](name='AudioLayer'),
  casterId?: string(name='CasterId'),
  followEnable?: int32(name='FollowEnable'),
  mixList?: [ string ](name='MixList'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model UpdateCasterSceneAudioResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateCasterSceneAudioResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateCasterSceneAudioResponseBody(name='body'),
}

async function updateCasterSceneAudioWithOptions(request: UpdateCasterSceneAudioRequest, runtime: Util.RuntimeOptions): UpdateCasterSceneAudioResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.audioLayer)) {
    query['AudioLayer'] = request.audioLayer;
  }
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.followEnable)) {
    query['FollowEnable'] = request.followEnable;
  }
  if (!Util.isUnset(request.mixList)) {
    query['MixList'] = request.mixList;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateCasterSceneAudio',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateCasterSceneAudio(request: UpdateCasterSceneAudioRequest): UpdateCasterSceneAudioResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCasterSceneAudioWithOptions(request, runtime);
}

model UpdateCasterSceneConfigRequest {
  casterId?: string(name='CasterId'),
  componentId?: [ string ](name='ComponentId'),
  layoutId?: string(name='LayoutId'),
  ownerId?: long(name='OwnerId'),
  sceneId?: string(name='SceneId'),
}

model UpdateCasterSceneConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateCasterSceneConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateCasterSceneConfigResponseBody(name='body'),
}

async function updateCasterSceneConfigWithOptions(request: UpdateCasterSceneConfigRequest, runtime: Util.RuntimeOptions): UpdateCasterSceneConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.casterId)) {
    query['CasterId'] = request.casterId;
  }
  if (!Util.isUnset(request.componentId)) {
    query['ComponentId'] = request.componentId;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.sceneId)) {
    query['SceneId'] = request.sceneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateCasterSceneConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateCasterSceneConfig(request: UpdateCasterSceneConfigRequest): UpdateCasterSceneConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCasterSceneConfigWithOptions(request, runtime);
}

model UpdateLiveAppSnapshotConfigRequest {
  appName?: string(name='AppName'),
  callback?: string(name='Callback'),
  domainName?: string(name='DomainName'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  overwriteOssObject?: string(name='OverwriteOssObject'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
  sequenceOssObject?: string(name='SequenceOssObject'),
  timeInterval?: int32(name='TimeInterval'),
}

model UpdateLiveAppSnapshotConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveAppSnapshotConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveAppSnapshotConfigResponseBody(name='body'),
}

async function updateLiveAppSnapshotConfigWithOptions(request: UpdateLiveAppSnapshotConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveAppSnapshotConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.overwriteOssObject)) {
    query['OverwriteOssObject'] = request.overwriteOssObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.sequenceOssObject)) {
    query['SequenceOssObject'] = request.sequenceOssObject;
  }
  if (!Util.isUnset(request.timeInterval)) {
    query['TimeInterval'] = request.timeInterval;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveAppSnapshotConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveAppSnapshotConfig(request: UpdateLiveAppSnapshotConfigRequest): UpdateLiveAppSnapshotConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveAppSnapshotConfigWithOptions(request, runtime);
}

model UpdateLiveAudioAuditConfigRequest {
  appName?: string(name='AppName'),
  bizType?: string(name='BizType'),
  domainName?: string(name='DomainName'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossObject?: string(name='OssObject'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName'),
}

model UpdateLiveAudioAuditConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveAudioAuditConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveAudioAuditConfigResponseBody(name='body'),
}

async function updateLiveAudioAuditConfigWithOptions(request: UpdateLiveAudioAuditConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveAudioAuditConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.bizType)) {
    query['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossObject)) {
    query['OssObject'] = request.ossObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveAudioAuditConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveAudioAuditConfig(request: UpdateLiveAudioAuditConfigRequest): UpdateLiveAudioAuditConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveAudioAuditConfigWithOptions(request, runtime);
}

model UpdateLiveAudioAuditNotifyConfigRequest {
  callback?: string(name='Callback'),
  callbackTemplate?: string(name='CallbackTemplate'),
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
}

model UpdateLiveAudioAuditNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveAudioAuditNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveAudioAuditNotifyConfigResponseBody(name='body'),
}

async function updateLiveAudioAuditNotifyConfigWithOptions(request: UpdateLiveAudioAuditNotifyConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveAudioAuditNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!Util.isUnset(request.callbackTemplate)) {
    query['CallbackTemplate'] = request.callbackTemplate;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveAudioAuditNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveAudioAuditNotifyConfig(request: UpdateLiveAudioAuditNotifyConfigRequest): UpdateLiveAudioAuditNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveAudioAuditNotifyConfigWithOptions(request, runtime);
}

model UpdateLiveDetectNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  notifyUrl?: string(name='NotifyUrl'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model UpdateLiveDetectNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveDetectNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveDetectNotifyConfigResponseBody(name='body'),
}

async function updateLiveDetectNotifyConfigWithOptions(request: UpdateLiveDetectNotifyConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveDetectNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveDetectNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveDetectNotifyConfig(request: UpdateLiveDetectNotifyConfigRequest): UpdateLiveDetectNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveDetectNotifyConfigWithOptions(request, runtime);
}

model UpdateLivePullStreamInfoConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  endTime?: string(name='EndTime'),
  ownerId?: long(name='OwnerId'),
  sourceUrl?: string(name='SourceUrl'),
  startTime?: string(name='StartTime'),
  streamName?: string(name='StreamName'),
}

model UpdateLivePullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLivePullStreamInfoConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLivePullStreamInfoConfigResponseBody(name='body'),
}

async function updateLivePullStreamInfoConfigWithOptions(request: UpdateLivePullStreamInfoConfigRequest, runtime: Util.RuntimeOptions): UpdateLivePullStreamInfoConfigResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLivePullStreamInfoConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLivePullStreamInfoConfig(request: UpdateLivePullStreamInfoConfigRequest): UpdateLivePullStreamInfoConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLivePullStreamInfoConfigWithOptions(request, runtime);
}

model UpdateLiveRecordNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  needStatusNotify?: boolean(name='NeedStatusNotify'),
  notifyUrl?: string(name='NotifyUrl'),
  onDemandUrl?: string(name='OnDemandUrl'),
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model UpdateLiveRecordNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveRecordNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveRecordNotifyConfigResponseBody(name='body'),
}

async function updateLiveRecordNotifyConfigWithOptions(request: UpdateLiveRecordNotifyConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveRecordNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.needStatusNotify)) {
    query['NeedStatusNotify'] = request.needStatusNotify;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.onDemandUrl)) {
    query['OnDemandUrl'] = request.onDemandUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveRecordNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveRecordNotifyConfig(request: UpdateLiveRecordNotifyConfigRequest): UpdateLiveRecordNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveRecordNotifyConfigWithOptions(request, runtime);
}

model UpdateLiveSnapshotDetectPornConfigRequest {
  appName?: string(name='AppName'),
  domainName?: string(name='DomainName'),
  interval?: int32(name='Interval'),
  ossBucket?: string(name='OssBucket'),
  ossEndpoint?: string(name='OssEndpoint'),
  ossObject?: string(name='OssObject'),
  ownerId?: long(name='OwnerId'),
  scene?: [ string ](name='Scene'),
  securityToken?: string(name='SecurityToken'),
}

model UpdateLiveSnapshotDetectPornConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveSnapshotDetectPornConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveSnapshotDetectPornConfigResponseBody(name='body'),
}

async function updateLiveSnapshotDetectPornConfigWithOptions(request: UpdateLiveSnapshotDetectPornConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveSnapshotDetectPornConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!Util.isUnset(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!Util.isUnset(request.ossObject)) {
    query['OssObject'] = request.ossObject;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.scene)) {
    query['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveSnapshotDetectPornConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveSnapshotDetectPornConfig(request: UpdateLiveSnapshotDetectPornConfigRequest): UpdateLiveSnapshotDetectPornConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveSnapshotDetectPornConfigWithOptions(request, runtime);
}

model UpdateLiveSnapshotNotifyConfigRequest {
  domainName?: string(name='DomainName'),
  notifyAuthKey?: string(name='NotifyAuthKey'),
  notifyReqAuth?: string(name='NotifyReqAuth'),
  notifyUrl?: string(name='NotifyUrl'),
  ownerId?: long(name='OwnerId'),
}

model UpdateLiveSnapshotNotifyConfigResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveSnapshotNotifyConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveSnapshotNotifyConfigResponseBody(name='body'),
}

async function updateLiveSnapshotNotifyConfigWithOptions(request: UpdateLiveSnapshotNotifyConfigRequest, runtime: Util.RuntimeOptions): UpdateLiveSnapshotNotifyConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.notifyAuthKey)) {
    query['NotifyAuthKey'] = request.notifyAuthKey;
  }
  if (!Util.isUnset(request.notifyReqAuth)) {
    query['NotifyReqAuth'] = request.notifyReqAuth;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveSnapshotNotifyConfig',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveSnapshotNotifyConfig(request: UpdateLiveSnapshotNotifyConfigRequest): UpdateLiveSnapshotNotifyConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveSnapshotNotifyConfigWithOptions(request, runtime);
}

model UpdateLiveStreamMonitorRequest {
  app?: string(name='App'),
  domain?: string(name='Domain'),
  inputList?: string(name='InputList'),
  monitorId?: string(name='MonitorId'),
  monitorName?: string(name='MonitorName'),
  outputTemplate?: string(name='OutputTemplate'),
  ownerId?: long(name='OwnerId'),
  stream?: string(name='Stream'),
}

model UpdateLiveStreamMonitorResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveStreamMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveStreamMonitorResponseBody(name='body'),
}

async function updateLiveStreamMonitorWithOptions(request: UpdateLiveStreamMonitorRequest, runtime: Util.RuntimeOptions): UpdateLiveStreamMonitorResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.app)) {
    query['App'] = request.app;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.inputList)) {
    query['InputList'] = request.inputList;
  }
  if (!Util.isUnset(request.monitorId)) {
    query['MonitorId'] = request.monitorId;
  }
  if (!Util.isUnset(request.monitorName)) {
    query['MonitorName'] = request.monitorName;
  }
  if (!Util.isUnset(request.outputTemplate)) {
    query['OutputTemplate'] = request.outputTemplate;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.stream)) {
    query['Stream'] = request.stream;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveStreamMonitor',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveStreamMonitor(request: UpdateLiveStreamMonitorRequest): UpdateLiveStreamMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveStreamMonitorWithOptions(request, runtime);
}

model UpdateLiveStreamWatermarkRequest {
  description?: string(name='Description'),
  height?: int32(name='Height'),
  name?: string(name='Name'),
  offsetCorner?: string(name='OffsetCorner'),
  ownerId?: long(name='OwnerId'),
  pictureUrl?: string(name='PictureUrl'),
  refHeight?: int32(name='RefHeight'),
  refWidth?: int32(name='RefWidth'),
  templateId?: string(name='TemplateId'),
  transparency?: int32(name='Transparency'),
  XOffset?: float(name='XOffset'),
  YOffset?: float(name='YOffset'),
}

model UpdateLiveStreamWatermarkResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveStreamWatermarkResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveStreamWatermarkResponseBody(name='body'),
}

async function updateLiveStreamWatermarkWithOptions(request: UpdateLiveStreamWatermarkRequest, runtime: Util.RuntimeOptions): UpdateLiveStreamWatermarkResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.height)) {
    query['Height'] = request.height;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.offsetCorner)) {
    query['OffsetCorner'] = request.offsetCorner;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.pictureUrl)) {
    query['PictureUrl'] = request.pictureUrl;
  }
  if (!Util.isUnset(request.refHeight)) {
    query['RefHeight'] = request.refHeight;
  }
  if (!Util.isUnset(request.refWidth)) {
    query['RefWidth'] = request.refWidth;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.transparency)) {
    query['Transparency'] = request.transparency;
  }
  if (!Util.isUnset(request.XOffset)) {
    query['XOffset'] = request.XOffset;
  }
  if (!Util.isUnset(request.YOffset)) {
    query['YOffset'] = request.YOffset;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveStreamWatermark',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveStreamWatermark(request: UpdateLiveStreamWatermarkRequest): UpdateLiveStreamWatermarkResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveStreamWatermarkWithOptions(request, runtime);
}

model UpdateLiveStreamWatermarkRuleRequest {
  description?: string(name='Description'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  ruleId?: string(name='RuleId'),
  templateId?: string(name='TemplateId'),
}

model UpdateLiveStreamWatermarkRuleResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveStreamWatermarkRuleResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveStreamWatermarkRuleResponseBody(name='body'),
}

async function updateLiveStreamWatermarkRuleWithOptions(request: UpdateLiveStreamWatermarkRuleRequest, runtime: Util.RuntimeOptions): UpdateLiveStreamWatermarkRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveStreamWatermarkRule',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveStreamWatermarkRule(request: UpdateLiveStreamWatermarkRuleRequest): UpdateLiveStreamWatermarkRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveStreamWatermarkRuleWithOptions(request, runtime);
}

model UpdateLiveTopLevelDomainRequest {
  domainName?: string(name='DomainName'),
  securityToken?: string(name='SecurityToken'),
  topLevelDomain?: string(name='TopLevelDomain'),
}

model UpdateLiveTopLevelDomainResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveTopLevelDomainResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveTopLevelDomainResponseBody(name='body'),
}

async function updateLiveTopLevelDomainWithOptions(request: UpdateLiveTopLevelDomainRequest, runtime: Util.RuntimeOptions): UpdateLiveTopLevelDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  if (!Util.isUnset(request.topLevelDomain)) {
    query['TopLevelDomain'] = request.topLevelDomain;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveTopLevelDomain',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveTopLevelDomain(request: UpdateLiveTopLevelDomainRequest): UpdateLiveTopLevelDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveTopLevelDomainWithOptions(request, runtime);
}

model UpdateMessageAppRequest {
  appConfig?: map[string]string(name='AppConfig'),
  appId?: string(name='AppId'),
  appName?: string(name='AppName'),
  extension?: map[string]string(name='Extension'),
}

model UpdateMessageAppShrinkRequest {
  appConfigShrink?: string(name='AppConfig'),
  appId?: string(name='AppId'),
  appName?: string(name='AppName'),
  extensionShrink?: string(name='Extension'),
}

model UpdateMessageAppResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateMessageAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMessageAppResponseBody(name='body'),
}

async function updateMessageAppWithOptions(tmpReq: UpdateMessageAppRequest, runtime: Util.RuntimeOptions): UpdateMessageAppResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateMessageAppShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.appConfig)) {
    request.appConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.appConfig, 'AppConfig', 'json');
  }
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appConfigShrink)) {
    body['AppConfig'] = request.appConfigShrink;
  }
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMessageApp',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMessageApp(request: UpdateMessageAppRequest): UpdateMessageAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMessageAppWithOptions(request, runtime);
}

model UpdateMessageGroupRequest {
  appId?: string(name='AppId'),
  extension?: map[string]string(name='Extension'),
  groupId?: string(name='GroupId'),
}

model UpdateMessageGroupShrinkRequest {
  appId?: string(name='AppId'),
  extensionShrink?: string(name='Extension'),
  groupId?: string(name='GroupId'),
}

model UpdateMessageGroupResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model UpdateMessageGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMessageGroupResponseBody(name='body'),
}

async function updateMessageGroupWithOptions(tmpReq: UpdateMessageGroupRequest, runtime: Util.RuntimeOptions): UpdateMessageGroupResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateMessageGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMessageGroup',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMessageGroup(request: UpdateMessageGroupRequest): UpdateMessageGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMessageGroupWithOptions(request, runtime);
}

model UpdateMixStreamRequest {
  domainName?: string(name='DomainName'),
  inputStreamList?: string(name='InputStreamList'),
  layoutId?: string(name='LayoutId'),
  mixStreamId?: string(name='MixStreamId'),
  ownerId?: long(name='OwnerId'),
}

model UpdateMixStreamResponseBody = {
  mixStreamId?: string(name='MixStreamId'),
  requestId?: string(name='RequestId'),
}

model UpdateMixStreamResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMixStreamResponseBody(name='body'),
}

async function updateMixStreamWithOptions(request: UpdateMixStreamRequest, runtime: Util.RuntimeOptions): UpdateMixStreamResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.inputStreamList)) {
    query['InputStreamList'] = request.inputStreamList;
  }
  if (!Util.isUnset(request.layoutId)) {
    query['LayoutId'] = request.layoutId;
  }
  if (!Util.isUnset(request.mixStreamId)) {
    query['MixStreamId'] = request.mixStreamId;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMixStream',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMixStream(request: UpdateMixStreamRequest): UpdateMixStreamResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMixStreamWithOptions(request, runtime);
}

model VerifyLiveDomainOwnerRequest {
  domainName?: string(name='DomainName'),
  ownerId?: long(name='OwnerId'),
  verifyType?: string(name='VerifyType'),
}

model VerifyLiveDomainOwnerResponseBody = {
  content?: string(name='Content'),
  requestId?: string(name='RequestId'),
}

model VerifyLiveDomainOwnerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: VerifyLiveDomainOwnerResponseBody(name='body'),
}

async function verifyLiveDomainOwnerWithOptions(request: VerifyLiveDomainOwnerRequest, runtime: Util.RuntimeOptions): VerifyLiveDomainOwnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!Util.isUnset(request.verifyType)) {
    query['VerifyType'] = request.verifyType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'VerifyLiveDomainOwner',
    version = '2016-11-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function verifyLiveDomainOwner(request: VerifyLiveDomainOwnerRequest): VerifyLiveDomainOwnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyLiveDomainOwnerWithOptions(request, runtime);
}

